SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sending email with line breaks

    Hello. I have a PHP form processing script that sends the form results via email. Right now I'm constructing the email body using line break characters of "\r\n" at the end of every line. Seems to work for most email clients, but someone using Outlook from Office 2000 is reporting that the whole email is crammed into one line. Something else I should be doing to force a line break in the email? Thanks in advance.
    Nate Baldwin
    mindpalette.com

  2. #2
    SitePoint Guru enygmadae's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Tx.
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe just try "\n\n" ?

    That's seemed to work well for me in the past.
    "\r\n" is a windows linebreak i think anyway...
    PHP News, Views and Community: http://www.phpdeveloper.org

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    \n should work for everything

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just got a new message from this client, and it turns out that the \n\n works fine, thanks! So, I had originally thoght that the \r was needed on some systems, but it seems to be causing problems. Think there's any need to include a \r in there as well? Thanks again for the help. I owe everyone a, er, what do you want, a raspberry zinger?
    Nate Baldwin
    mindpalette.com

  5. #5
    SitePoint Guru enygmadae's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Tx.
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nope, I think most clients will recognise the '\n\n'

    As for the zinger, bring it on
    PHP News, Views and Community: http://www.phpdeveloper.org

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thanks, \n it is! and the Zinger's in the mail
    Nate Baldwin
    mindpalette.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •