CDOSYS Sample Email Code

<%
Dim ObjSendMail
Dim iConf
Dim Flds
 
Set ObjSendMail = Server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
 
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
 
'**** Path below may need to be changed if it is not correct
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
Flds.Update
 
Set ObjSendMail.Configuration = iConf
ObjSendMail.To = "abc@abc.com"
ObjSendMail.Subject = "this is the subject"
ObjSendMail.From = "xyz@xyz.com"
 
' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"
 
ObjSendMail.Send
 
Set ObjSendMail = Nothing
%>

Was this answer helpful?

 Print this Article

Also Read

Perl

PROBLEM: When you use a Common Gateway Interface (CGI) application with Microsoft Internet...

SQL Server Connection String

string str = 'server=localhost;database=dbname;uid=dbuser;pwd=dbpass;'; dbname : Your Database...

Uploading / Updating Microsoft SQL Server DataBase

1 : Upload your local database files [ LDF & MDF ] any where in WWW folder. Theses database...

Adding new domain in HELM [ Resellers Only ]

[1] Login to HELM [ Using your reseller login information ] [2] Click on Users [3] Click on Add...

MS Access DSN Less Connection Example

Here is the example code for dsn less ms access connection. <% Set db =...

Powered by WHMCompleteSolution