Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make an email into an HTML email instead of text. 1

Status
Not open for further replies.

HardCoreCoder

Programmer
Feb 13, 2008
11
US
What do I need to add to this set of code to make it an HTML email?

Code:
<%@language="VBScript"%>
<%Option Explicit%>

Dim objMail

	Set objMail=CreateObject("CDO.Message")
	objMail.Subject=strSubject
	objMail.From="mpbarone@aaamichigan.com"
	objMail.To="mpbarone@aaamichigan.com"
	objMail.TextBody="Message"
	objMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2
	objMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "xxx.78.xxx.242"
	objMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25
	objMail.Configuration.Fields.Update
	objMail.Send
	Set objMail=nothing
 
Change:

objMail.TextBody="Message"

To:

objMail.HTMLBody="<span style=""color:red;"">HTML Message</span>"

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top