View Single Post
  #5 (permalink)  
Old November 8th, 2009, 07:01 PM
futurehype futurehype is offline
Authorized User
Join Date: Oct 2009
Posts: 10
Thanks: 6
Thanked 1 Time in 1 Post
Default CreateMHTMLBody

Hi, thanks again for the help. I've used your code to tidy up the sending page, and I've changed some of the code so I can send a webpage that I have on my server but sadly it's still just sending a link not the actual page.

I thought and have read that CreateMHTMLbody converts the address in the code and encapsulates it into a webpage which is then sent as an email. Am I wrong on this. I've used this:

.CreateMHTMLBody = "http://www.???" & OrderID & "&CustomerID=" & CustomerID"

and when I type it into my browser it brings up the correct page and as I've mentioned the email you've helped me with works and send to both me and the customer. Can you see anything wrong with what I'm doing?

Thanks again

function SendEmail(c)
Const cdoSendUsingPort = 2
Dim iMsg,iConf,Flds,strHTML,strSmartHost
StrSmartHost = "???" 'place you SMTP address here
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("") = cdoSendUsingPort
.Item("") = strSmartHost
.Item("") = 60
.Item ("") = 1
.Item ("") ="websales@???"
.Item ("") ="???"
End With
With iMsg
Set .Configuration = iConf
.To = c
.From = websales@???
.Subject = "Your order from ???"
.CreateMHTMLBody = "http://www.???" & OrderID & "&CustomerID=" & CustomerID"
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
end function
Reply With Quote