View Full Version : ASPmail and line breaks help needed

02-03-2005, 08:53 PM
When I use the following code to send my form results via email (from http://www.serverobjects.com/comp/Aspmail3.htm) - it works great when I get it with line breaks for each form item, however, when my client gets the email - there are no line breaks - just a blob of information. I use EudoraPro - he uses Outlook. Help - I don't understand why it is working in one and not the other. Is there another way to get the information emailed in a neat and readable format? I appreciate any insight you can provide.
(Server uses ASPMail 3.x)

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.AddRecipient "XYZ Company", "email@123.com"
Mailer.RemoteHost = "mail.123.com"
Mailer.Subject = "Survey"
Mailer.FromAddress = Request.Form("Email")
strMsgHeader = "Form Information Follows: " & vbCrLf
for i = 1 to Request.Form.Count
strMsgInfo = strMsgInfo & Request.Form.Key(i) & " - " & Request.Form.Item(i) & vbCrLf
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

if Mailer.SendMail then
Response.Write "Mail sent..."
Response.Write "Mail send failure. Error was " & Mailer.Response
end if

02-04-2005, 02:06 AM
I had similar problem in asp.net, so I'm guessing -
if Mailer has BodyFormat property, then use HTML format instead of plain Text and replace all VbCrLf with "<br>"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum