Trying to send e-mail using CDONTS but I keep getting eeror when I try and add the current date to one of the body lines
MyBody = MyBody & "Date code was generated: " + =date() & vbCrLf
Here is the full code- Thanks for any help
<%
email=session("x_email")
site= sitecode
Machine= machineid
currentime=date()
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "Me <Helpdesk@somewhere.us>"
MyCDONTSMail.To= email
MyCDONTSMail.Subject="License registration receipt for: " + request.form("CustomerNametext")
MyBody="Below are the details of your purchase." & vbCrLf & vbCrLf & vbCrLf
MyBody =Mybody & "Product Registerd: " + nm(1) & vbCrLf
MyBody =MyBody & "Registering Technician: "+ session("x_firstname") +" "+ session("x_lastname") & vbCrLf
MyBody = MyBody & "Date code was generated: " + =date() & vbCrLf
MyBody = MyBody & "Sitecode of Machine: " + request.form("frmsitecode") & vbCrLf
MyBody = MyBody & "Activation Code for Product: " + & vbCrLf
MyBody = MyBody & "E-mail Support: service@theprogrammers.com" & vbCrLf
MyBody = MyBody & "Sample Phone Number " & vbCrLf & vbCrLf & vbCrLf
MyBody = MyBody & "Once again thank you for your purchase" & vbCrLf & vbCrLf
MyBody = MyBody & "Sample Text"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
%>
If knowledge were power I would be a AAA battery!
MyBody = MyBody & "Date code was generated: " + =date() & vbCrLf
Here is the full code- Thanks for any help
<%
email=session("x_email")
site= sitecode
Machine= machineid
currentime=date()
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "Me <Helpdesk@somewhere.us>"
MyCDONTSMail.To= email
MyCDONTSMail.Subject="License registration receipt for: " + request.form("CustomerNametext")
MyBody="Below are the details of your purchase." & vbCrLf & vbCrLf & vbCrLf
MyBody =Mybody & "Product Registerd: " + nm(1) & vbCrLf
MyBody =MyBody & "Registering Technician: "+ session("x_firstname") +" "+ session("x_lastname") & vbCrLf
MyBody = MyBody & "Date code was generated: " + =date() & vbCrLf
MyBody = MyBody & "Sitecode of Machine: " + request.form("frmsitecode") & vbCrLf
MyBody = MyBody & "Activation Code for Product: " + & vbCrLf
MyBody = MyBody & "E-mail Support: service@theprogrammers.com" & vbCrLf
MyBody = MyBody & "Sample Phone Number " & vbCrLf & vbCrLf & vbCrLf
MyBody = MyBody & "Once again thank you for your purchase" & vbCrLf & vbCrLf
MyBody = MyBody & "Sample Text"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
%>
If knowledge were power I would be a AAA battery!