Sending mail with CDOSYS Print

  • 1

 



Dim sMsg

Dim sTo

Dim sFrom

Dim sSubject

Dim sTextBody



sTo = "recipient@maildomain.com"

sFrom = "fromaddress@maildomain.com"

sSubject = "Insert here your subject text"

sTextBody = "Insert here your plain body text"



Dim objMail

'Create the mail object

Set objMail = Server.CreateObject("CDO.Message")



'Set key properties

objMail.From = sFrom

objMail.To = sTo

objMail.Subject= sSubject

objMail.TextBody = sTextBody



'Send the email

objMail.Send



'Clean-up mail object

Set objMail = Nothing

 


Was this answer helpful?

« Back