replacing breaks

Discussion in 'ASP General' started by middletree, Jul 29, 2004.

  1. middletree

    middletree Guest

    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?
     
    middletree, Jul 29, 2004
    #1
    1. Advertising

  2. middletree

    Bob Lehmann Guest

    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" <> wrote in message
    news:#...
    > 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?
    >
    >
     
    Bob Lehmann, Jul 29, 2004
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:#...
    > 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?
    >
    >
     
    Aaron [SQL Server MVP], Jul 29, 2004
    #3
  4. middletree

    middletree Guest

    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]" <> wrote in message
    news:%...
    > 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" <> wrote in message
    > news:#...
    > > 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?
    > >
    > >

    >
    >
     
    middletree, Jul 29, 2004
    #4
  5. > I am used to CDO, but they are using something else.

    Could you be more specific?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
     
    Aaron [SQL Server MVP], Jul 29, 2004
    #5
  6. middletree

    middletree Guest

    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]" <> wrote in message
    news:...
    > > I am used to CDO, but they are using something else.

    >
    > Could you be more specific?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
     
    middletree, Jul 29, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raj Mudaliar
    Replies:
    0
    Views:
    2,282
    Raj Mudaliar
    Jul 14, 2003
  2. PJ
    Replies:
    1
    Views:
    523
    Sasha Shevelev
    Aug 4, 2003
  3. Andy
    Replies:
    0
    Views:
    313
  4. Ken Fine
    Replies:
    8
    Views:
    1,380
    Walter Wang [MSFT]
    Aug 29, 2007
  5. Rob Meade

    Replacing - and not Replacing...

    Rob Meade, Apr 5, 2005, in forum: ASP General
    Replies:
    5
    Views:
    285
    Chris Hohmann
    Apr 11, 2005
Loading...

Share This Page