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.???.co.uk/email.asp?OrderID=" & 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("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="websales@???.co.uk"
.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="???"
.Update
End With
With iMsg
Set .Configuration = iConf
.To = c
.From = websales@???.co.uk
.Subject = "Your order from ???"
.CreateMHTMLBody = "http://www.???.co.uk/email.asp?OrderID=" & OrderID & "&CustomerID=" & CustomerID"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
end function
%>
Reply With Quote