dbWriter Home
IP to Country Look up
Site Map

IP to Country DB

Free Databases:

ASP Code

ASP Links

VB Script functions:
Array
Case/Select
In String (inStr)
Replace

HTML code:
SELECT Color
SELECT Countries
SELECT Language
SELECT State/Province

SQL:

SQL Functions:
Delete leading Char
Get Browser
Long number from IP

Stored Procedures:

SQL Tricks:
Delete ALL duplicates
Delete dup records

MISC
IP Address Owner
MS SQL Server

Mortgage Calcs:
how much is my payment
Loan Amortization
Loan Calculator
Mortgage Calculator
Motrgage Pay Off

dbWriter License

Link to US

Links

Contact US
 

dbWriter.com SQL stored procedure for sending mail

A SQL stored procedure to send email using a CDONTS NewMail object (Microsoft Collaboration Data Objects for Windows NT Server).

CREATE PROCEDURE [dbo].[zp_sendMAIL]
@From varchar(100),
@To varchar(100),
@CC varchar(100) = null,
@Subject varchar(100),
@Body varchar(4000),
@BCC varchar(100) = null,
@Attachment varchar(150) = null

AS
Declare @MailID int
Declare @theMail int

EXEC @theMail = sp_OACreate 'CDONTS.NewMail', @MailID OUT
EXEC @theMail = sp_OASetProperty @MailID, 'From',@From
EXEC @theMail = sp_OASetProperty @MailID, 'To', @To
EXEC @theMail = sp_OASetProperty @MailID, 'CC', @CC
EXEC @theMail = sp_OASetProperty @MailID, 'Subject', @Subject
EXEC @theMail = sp_OASetProperty @MailID, 'Body', @Body
EXEC @theMail = sp_OASetProperty @MailID, 'BCC',@BCC
-- MIME format to ensure attachments are sent correctly via internet
EXEC @theMail = sp_OASetProperty @MailID, 'MailFormat', 0
EXEC @theMail = sp_OAMethod @MailID, 'AttachFile',NULL, @Attachment
EXEC @theMail = sp_OAMethod @MailID, 'Send', NULL
EXEC @theMail = sp_OADestroy @MailID
GO
 

Partners/Links © 2005 - 2008 dbWriter.com All Rights Reserved
This site is protected by the dbWriter IPtoCountry MS/SQL database!!
Site map | Link to US
Contact Us

Sign up for PayPal and start accepting credit card payments instantly.