replacing breaks

M

middletree

I have an email form page, and the body of the message is in a textarea. In
testing, I noticed that the paragraph breaks weren't showing up in my
web-based email that I sent to myself. So I put in a replace function to
replace vbcrlf with < br >. (I put those spaces in there for the purpose of
this post only).

Now, some email recipients are seeing the actual BR tag, depending on if
they have chosen to view emails as HTML or text. I am guessing that's why
it's different for some people.

What can I do about this, so that all users will see their email similar to
this post, not all bunched up into one paragraph, and no HTML tags showing?
 
B

Bob Lehmann

You guess correctly.

Either don't send HTML mail, or when the people on your list sign up, ask
whether they prefer HTML or text.

Bob Lehmann
 
A

Aaron [SQL Server MVP]

Some components support sending an HTML and plain text portion, so that the
format the user uses will dictate which portion is viewed.
http://www.aspfaq.com/2474

Or, as Bob suggests, send the format the user prefers. If you have to pick
only one format, go with plain text. HTML bloats the size of the e-mail,
and will be turned off or unsupported in a good percentage anyway.
 
M

middletree

Thanks. Unfortunately, for this site, I have no control over which component
they are using for mail. I am used to CDO, but they are using something
else. I need to find out from them how to change it to plain text.
 
A

Aaron [SQL Server MVP]

I am used to CDO, but they are using something else.

Could you be more specific?
 
M

middletree

Since I posted this, I found that the people hosting this site (of which I
am only doing a part) are using something called MailEnable. I tried to
build a mail form using my standard code I always use, which created a CDO
object. But it didn't work, and their support folks told that I'd have to
use the following code to send mail from a form:

-----------------------------------------------------------
Set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = strDefFrom
oMail.MailFromDisplayName = strFullName
oMail.ContentType = "text/html;"
oMail.MailTo = strRcpt
oMail.Subject = strSubject
oMail.MessageBody = strBody
oMail.SendMessage %>
---------------------------------------------------------

So I went to google, and found that it most likely is the MailEnable
component that is being used for mail forms. I went to mailenable's site,
and their support docs don't tell me what to if I want to send plain text
emails. I'm going to change this line:

oMail.ContentType = "text/html;"

to

oMail.ContentType = "text;"

and see what happens.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top