I'm trying to send emails with CDO but I can't find a way to embedded a html page I created.
I don't want to attach it. It has to display the html page.
I'm using a sample I found on this site like this:
how can I do that?
thanks for you help
I don't want to attach it. It has to display the html page.
I'm using a sample I found on this site like this:
how can I do that?
thanks for you help
Code:
cdoSendUsingPickup = 1
cdoSendUsingPort = 2
cdoAnonymous = 0
cdoBasic = 1 &&' clear text
cdoNTLM = 2 && 'NTLM
cdoDSNDefault = 0 &&'None
cdoDSNNever = 1 &&'None
cdoDSNFailure = 2 &&'Failure
cdoDSNSuccess = 4 &&'Success
cdoDSNDelay = 8 &&'Delay
cdoDSNSuccessFailOrDelay = 14
objMsg = CREATEOBJECT("CDO.Message")
objConf = CREATEOBJECT("CDO.Configuration")
objFlds = objConf.FIELDS
WITH objFlds
.ITEM("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = cdoSendUsingPort
.ITEM("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "x.x.x.x"
.ITEM("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")[/URL] = cdoBasic
.ITEM("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusername")[/URL] = "username"
.ITEM("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendpassword")[/URL] = "ed"
.UPDATE
ENDWITH
strBody = "This is a sample message."
strBody = strBody + "It was sent using CDO."
WITH objMsg
.Configuration = objConf
.TO = "myemail.com"
.FROM = "sender.com"
.Subject = "This is a CDO test message"
.TextBody = strBody
*.Addattachment "c:\temp\test.zip"
.FIELDS("urn:schemas:mailheader:disposition-notification-to") = "myemail.com"
.FIELDS("urn:schemas:mailheader:return-receipt-to") = "other.com"
.DSNOptions = cdoDSNSuccessFailOrDelay
.FIELDS.UPDATE
.SEND
ENDWITH