View Single Post
  #3 (permalink)  
Old November 8th, 2009, 09:58 AM
futurehype futurehype is offline
Authorized User
 
Join Date: Oct 2009
Posts: 10
Thanks: 6
Thanked 1 Time in 1 Post
Default objMail.CreateMHTMLBody

Hi thanks for all the help. I've got the email sending, but it's only sending a link to the page that I would like to send.

if I use objMail.CreateMHTMLBody I don't get the email at all.

Is there another way of sending a asp page with a couple of variables like orderid etc to a customers email as well as mine?

This is my code as it stands again.

<title>???.co.uk ???</title>
<%
function SendEmail(c)
Set objMail = Server.CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.

objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="???l"
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

' If your server requires outgoing authentication uncomment the lines below and use a valid email address and password.
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="websales@???.co.uk"
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="???"

objMail.Configuration.Fields.Update

'End remote SMTP server configuration section==

objMail.From = "websales@???.co.uk"
objMail.To = c
objMail.Bcc = "orders@???.co.uk" 'Maybe send a CC to your sales office
objMail.Subject = "Your order from ???"
objMail.HTMLBody = "http://www.???.co.uk/email.asp?OrderID=" & OrderID& "&CustomerID=" & CustomerID
objMail.TextBody = "http://www.???.co.uk/email.asp?OrderID=" & OrderID & "&CustomerID=" & CustomerID
'objMail.MailFormat=0
'objMail.BodyFormat=0
objMail.Send
Set objMail = Nothing
end function
%>

Thanks again for your help.
Reply With Quote