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
%>

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Creating application/virtual Directory in HELM

By default all \wwwroot folders are already configured as application directories. This allows...

SQL Server Connection String

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

How to create virtual directory in HELM?

Follow these steps to create a virtual directory : Login to HELM Click on Domains Click on your...

Perl

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

How can I check my website stats?

You can view Awstats only if it is enabled in your account. First, log into HELM via...

Powered by WHMCompleteSolution