japangreg
12-06-2005, 08:26 PM
Hi, all.
We seem to have developed a small glitch in our 'email me my password' request system: our host recently suffered a massive hardware failure and moved us to a new box running Win. Server 03. Then our sys admin installed new anti-spam hardware and forgot to allow our remote server to get through. Now that the last point has been rectified, the email being sent out is having some formatting issues.
Here is the code I am using:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "our.mail.host.com"
Mailer.ContentType = "text/html"
Mailer.WordWrap = true
Mailer.WordWrapLen = 255
Mailer.FromName = "Website Webmaster"
Mailer.FromAddress = "me@website.com"
Mailer.AddRecipient lname, email
Mailer.Subject = "Your website login and password"
Dim t_Msg
t_Msg = "<html><body>" & vbCrLf
t_Msg = t_Msg & "Dear " & objRS("LabelName").Value & ":" & vbCrLf
t_Msg = t_Msg & "<p>Your login information for the website is:" & vbCrLf
t_Msg = t_Msg & "<br>Username: " & objRS.Fields("strWebID").Value & vbCrLf
t_Msg = t_Msg & "<br>Password: " & objRS.Fields("Password").Value & vbCrLf
t_Msg = t_Msg & "<p>You can log on to the members only section of the website at <a href=""http://www.website.com/members/"">http://www.website.com/members/</a> " & vbCrLf
t_Msg = t_Msg & "<p>If you did not request this information, please contact <a href=""mailto:webmaster@website.com"">webmaster@website.com</a>." & vbCrLf
t_Msg = t_Msg & "</body></html>" & vbCrLf
Mailer.BodyText = t_Msg(the various fields are populated from a database query)
When I receive the email, this is what I see:Dear My Name:
Your login information for the website is:
Username: myUsername
Password: myPassword
You can log on to the members only section of the website= at http://www=2Ewebsite=2Eco= m/members/=2Easp
If you did not request this information, please contact webmaster@website=2Ecom=2EAny ideas as to what might be causing the strange formatting? I've tried reading the documentation, to no avail.
Any help appreciated.
We seem to have developed a small glitch in our 'email me my password' request system: our host recently suffered a massive hardware failure and moved us to a new box running Win. Server 03. Then our sys admin installed new anti-spam hardware and forgot to allow our remote server to get through. Now that the last point has been rectified, the email being sent out is having some formatting issues.
Here is the code I am using:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "our.mail.host.com"
Mailer.ContentType = "text/html"
Mailer.WordWrap = true
Mailer.WordWrapLen = 255
Mailer.FromName = "Website Webmaster"
Mailer.FromAddress = "me@website.com"
Mailer.AddRecipient lname, email
Mailer.Subject = "Your website login and password"
Dim t_Msg
t_Msg = "<html><body>" & vbCrLf
t_Msg = t_Msg & "Dear " & objRS("LabelName").Value & ":" & vbCrLf
t_Msg = t_Msg & "<p>Your login information for the website is:" & vbCrLf
t_Msg = t_Msg & "<br>Username: " & objRS.Fields("strWebID").Value & vbCrLf
t_Msg = t_Msg & "<br>Password: " & objRS.Fields("Password").Value & vbCrLf
t_Msg = t_Msg & "<p>You can log on to the members only section of the website at <a href=""http://www.website.com/members/"">http://www.website.com/members/</a> " & vbCrLf
t_Msg = t_Msg & "<p>If you did not request this information, please contact <a href=""mailto:webmaster@website.com"">webmaster@website.com</a>." & vbCrLf
t_Msg = t_Msg & "</body></html>" & vbCrLf
Mailer.BodyText = t_Msg(the various fields are populated from a database query)
When I receive the email, this is what I see:Dear My Name:
Your login information for the website is:
Username: myUsername
Password: myPassword
You can log on to the members only section of the website= at http://www=2Ewebsite=2Eco= m/members/=2Easp
If you did not request this information, please contact webmaster@website=2Ecom=2EAny ideas as to what might be causing the strange formatting? I've tried reading the documentation, to no avail.
Any help appreciated.