ASP: Email text formatting problem

Hi all,

I’m a newbie to ASP, currently trying to create a simple form2email script. I found Mike Hall’s ASP2email port, and I’m currently modifying the code to suit my needs. So far so good, as I’ve managed to sucsessfully implement the script, and I can send info from my form to my email. The problem is it seems that all the formating is lost when the mail is sent, and all my answers I receive (for my text boxes) is in a single line.

Any ideas on how I can overcome this problem? My net search indicate that I should use something like REPLACE, to add in &vbCrLf to replace any <BR> tags found, as ASP for some reason cannot recognize breaks in a document. Anyone who’s encountered problems like this before? Pls help! Thanks!

try this

replace(sMyText, chr(13), “<BR>”);
replace(sMyText, chr(10), “”);

now you can display the text in browser.

response.write sMyText

or in your case, if you have mime encoded the mail then you can add the var to your body html code.

mucho gracias senor. it works now. Thanks!