Code Comments
Programming Forum and web based access to our favorite programming groups.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?
Post Follow-up to this messageYou 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 "middletree" <middletree@htomail.com> wrote in message news:#fMqECXdEHA.2812@tk2msftngp13.phx.gbl... > 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? > >
Post Follow-up to this messageSome 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. -- http://www.aspfaq.com/ (Reverse address to reply.) "middletree" <middletree@htomail.com> wrote in message news:#fMqECXdEHA.2812@tk2msftngp13.phx.gbl... > 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? > >
Post Follow-up to this messageThanks. 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. "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:%23DM3hVXdEHA.1656@TK2MSFTNGP09.phx.gbl... > 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. > > -- > http://www.aspfaq.com/ > (Reverse address to reply.) > > > > > "middletree" <middletree@htomail.com> wrote in message > news:#fMqECXdEHA.2812@tk2msftngp13.phx.gbl... > In > of why > to > showing? > >
Post Follow-up to this message> I am used to CDO, but they are using something else. Could you be more specific? -- http://www.aspfaq.com/ (Reverse address to reply.)
Post Follow-up to this messageSince 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.
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:ueY9EjXdEHA.4004@TK2MSFTNGP10.phx.gbl...
>
> Could you be more specific?
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.