Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

replacing breaks
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?



Report this thread to moderator Post Follow-up to this message
Old Post
middletree
07-29-04 08:55 PM


Re: replacing breaks
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

"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?
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Lehmann
07-29-04 08:55 PM


Re: replacing breaks
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...
> 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?
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Aaron [SQL Server MVP]
07-29-04 08:55 PM


Re: replacing breaks
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.



"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? 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
middletree
07-29-04 08:55 PM


Re: replacing breaks
> I am used to CDO, but they are using something else.

Could you be more specific?

--
http://www.aspfaq.com/
(Reverse address to reply.)



Report this thread to moderator Post Follow-up to this message
Old Post
Aaron [SQL Server MVP]
07-29-04 08:55 PM


Re: replacing breaks
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.





"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.)
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
middletree
07-29-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:27 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.