mail() to Outlook, no carriage returns

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tyno Gendo

    mail() to Outlook, no carriage returns

    I'm sending normal text email, but in Outlook all the carriage returns
    are ignored. The text comes from MySQL database, and I've tried

    str_replace("\r ", "\r\n", $dr['email_template ']);

    I also tried sending header Content-type: text/plain but still no luck,
    still the email comes through as one big line.

    I'm sure this must be a common thing but I can't immediately find an
    answer through Google.

    Please can anyone help?

    I'm using the standard mail() command to send.
  • Tyno Gendo

    #2
    Re: mail() to Outlook, no carriage returns

    Tyno Gendo wrote:
    I'm sending normal text email, but in Outlook all the carriage returns
    are ignored. The text comes from MySQL database, and I've tried
    >
    str_replace("\r ", "\r\n", $dr['email_template ']);
    >
    I also tried sending header Content-type: text/plain but still no luck,
    still the email comes through as one big line.
    >
    I'm sure this must be a common thing but I can't immediately find an
    answer through Google.
    >
    Please can anyone help?
    >
    I'm using the standard mail() command to send.
    Sorry, I meant str_replace( "\n", "\r\n", $dr['email_template ']);

    Doesn't work.

    Comment

    • Tyno Gendo

      #3
      Re: mail() to Outlook, no carriage returns

      Tyno Gendo wrote:
      I'm sending normal text email, but in Outlook all the carriage returns
      are ignored. The text comes from MySQL database, and I've tried
      >
      str_replace("\r ", "\r\n", $dr['email_template ']);
      >
      I also tried sending header Content-type: text/plain but still no luck,
      still the email comes through as one big line.
      >
      I'm sure this must be a common thing but I can't immediately find an
      answer through Google.
      >
      Please can anyone help?
      >
      I'm using the standard mail() command to send.
      Sorry all, me do bad. The replace does work, would help if I did it
      in the correct place in my code, I'd replaced at the wrong point.

      DOH!

      Comment

      • Erwin Moller

        #4
        Re: mail() to Outlook, no carriage returns

        Tyno Gendo wrote:
        Tyno Gendo wrote:
        >I'm sending normal text email, but in Outlook all the carriage returns
        >are ignored. The text comes from MySQL database, and I've tried
        >>
        >str_replace("\ r", "\r\n", $dr['email_template ']);
        >>
        >I also tried sending header Content-type: text/plain but still no luck,
        >still the email comes through as one big line.
        >>
        >I'm sure this must be a common thing but I can't immediately find an
        >answer through Google.
        >>
        >Please can anyone help?
        >>
        >I'm using the standard mail() command to send.
        >
        Sorry all, me do bad. The replace does work, would help if I did it
        in the correct place in my code, I'd replaced at the wrong point.
        >
        DOH!
        Glad to be of service. ;-)

        Regards,
        Erwin Moller

        Comment

        Working...