Windows 2000 and Windows XP use CDO messaging as a replacement for CDONTS. Sending email with CDO is a simple task.
First we create a reference to the CDO component
Set objMessage = CreateObject("CDO.Message")
then fill-in Sender, Subject and Recipient (To) fields of the headers and the body text which can be either plain text or HTML. You can also add a file attachment. You then use the Send method to send the email.
Set oMessage = CreateObject("CDO.Message")
oMessage.Subject = "Example CDO Message"
oMessage.Sender = "me@my.com"
oMessage.To = "test@test.com"
' ** The line below shows how to send using HTML included directly in your script
oMessage.HTMLBody = "<h1>This is some sample message html.</h1>"
oMessage.Bcc = "you@your.com"
oMessage.Cc = "you2@your.com"
oMessage.Send
Posted in CDO Component

daniva




April 11th, 2008 at 6:17 am
[…] This QTip is another variation of Sending an HTML email. […]
June 6th, 2008 at 12:48 am
do you need outlook to be installed?