econs About Us Hosting Services Contact Us Support
econs
Portal HomeClient AreaAnnouncementsKnowledgebaseSupport TicketsDownloads
LiveZilla Live Help

Knowledgebase
You are here: Portal Home > Knowledgebase > Windows > CDOSYS Sample Email Code

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?

Add to Favourites
Print this Article

Also Read
HELM Navigation (Views: 94)
Frontpage Editing (Views: 102)

Powered by WHMCompleteSolution


Language:

.biz .info .tv .us .org .cc .cn .com.cn .tw .name .eu .ws .mobi
 
Econs © 2003 - 2010 Projects and scripts Privacy Policy Terms Of Use
Our Partners : Islamedia.ws Ekarobar.com