Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Mail Quirk with CDO/CDONTS



3:08 pm on Mar 19, 2007 (gmt 0)

10+ Year Member

I have noticed from time to time that e-mail messages I receive from html forms display differently.

My asp page gathers the data for the body of the e-mail as follows:

txtBody = txtBody & "Form data posted" & vbcrlf &_
"First Name: " & Request.Form("txtFirstName") & vbcrlf &_
"Last Name: " & Request.Form("txtLastName") & vbcrlf

When I receive the e-mail, parts of it will be displayed as expected:

Form data posted
First Name: Andrew
Last Name: Smith

However, fields that are gathered in the same way as the code above will also display as following:

Form data posted
First Name: Andrew Last Name: Smith.

Certain fields will not wrap while others wrap without issue. But the code is the same for all fields.

If I add an additional vbcrlf, then I get two returns...

Has anyone experienced this? Does anyone know what would cause this?

Thanks in advance.


7:33 am on Mar 28, 2007 (gmt 0)

10+ Year Member

That's weird. Did you ever figure out what was causing that? Text vs. html? Strange that it would do that.


2:48 am on Mar 29, 2007 (gmt 0)

10+ Year Member

Are you using Outlook to read emails? Often times outlook 2003(?) and above will remove what it deems to be extraneous linefeeds. Don't ask me how it determines that because in identical forms, sometimes it will and sometimes it won't do it.

If this is in Outlook, the top of the message has something you can click to add the "extraneous" linefeeds back into the mail. Look for that...


12:46 am on Apr 1, 2007 (gmt 0)

10+ Year Member

I am not sure if this is the issue, but I notice that you have a &_ to concatenate your data, but it should be a & _ (with a space between them). It could be that it is not wrapping at all from that code, but then some code converted to a line feed when it does wrap.

Just my 2 cents.


9:29 pm on Apr 5, 2007 (gmt 0)

10+ Year Member

Thanks everyone...

I am embarassed to admit it, but bmcgee was correct. Thanks bmcgee for the heads up. Outlook was stripping some line brakes, but not all line breaks. Perhaps that is why I missed it...

Thanks again.


Featured Threads

Hot Threads This Week

Hot Threads This Month