Email Messages With Odd Breaks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Self

    #1

    Email Messages With Odd Breaks

    I'm creating a PHP form handler that will send an email to a user
    based on form entries (a rather standard procedure). I've never had
    any problems with this type of programming challenge before; however,
    this is a very complex form. I save all of the form's data in a single
    variable named $mailout and then call the mail() function with
    $mailout as the body.

    The information I'm sending is about 1200 characters long. I noticed
    that in the email the user receives, there is an odd break at about
    character 1000. It reads something like this:

    Style: Red tu!
    dor with attached garage

    Everything else looks correct. The first 1000 characters are right and
    any remaining characters are right. It's just at about character 1000
    I get an exclamation point and then the data continue on the next line
    (with a small indent).

    I thought that maybe there was some sort of limit to the size of the
    PHP variable, so I broke $mailout into two pieces, both well under the
    magic size limit. That did not help.

    I thought that maybe the mail() function was somehow breaking up this
    message, so I created a small routine to write the output directly to
    sendmail. That didn't help.

    I wonder if this is a sendmail issue. Does anyone know of any reason
    why I'm getting this odd break in my messages and how I can fix it?

    --George
  • denis

    #2
    Re: Email Messages With Odd Breaks

    "George Self" <gself@gself.co m> a écrit dans le message news:
    f7fu8059qrrauhr nq49dtqnjl7k0j0 bpos@4ax.com...[color=blue]
    > I'm creating a PHP form handler that will send an email to a user
    > based on form entries (a rather standard procedure). I've never had
    > any problems with this type of programming challenge before; however,
    > this is a very complex form. I save all of the form's data in a single
    > variable named $mailout and then call the mail() function with
    > $mailout as the body.
    >
    > The information I'm sending is about 1200 characters long. I noticed
    > that in the email the user receives, there is an odd break at about
    > character 1000. It reads something like this:
    >
    > Style: Red tu!
    > dor with attached garage
    >
    > Everything else looks correct. The first 1000 characters are right and
    > any remaining characters are right. It's just at about character 1000
    > I get an exclamation point and then the data continue on the next line
    > (with a small indent).
    >
    > I thought that maybe there was some sort of limit to the size of the
    > PHP variable, so I broke $mailout into two pieces, both well under the
    > magic size limit. That did not help.
    >
    > I thought that maybe the mail() function was somehow breaking up this
    > message, so I created a small routine to write the output directly to
    > sendmail. That didn't help.
    >
    > I wonder if this is a sendmail issue. Does anyone know of any reason
    > why I'm getting this odd break in my messages and how I can fix it?
    >
    > --George[/color]

    I had the same problem.
    Add \n every 500 characters.

    --
    denis


    Comment

    • Jochen Daum

      #3
      Re: Email Messages With Odd Breaks

      Hi George,

      On Tue, 27 Apr 2004 22:21:05 -0700, George Self <gself@gself.co m>
      wrote:
      [color=blue]
      >I'm creating a PHP form handler that will send an email to a user
      >based on form entries (a rather standard procedure). I've never had
      >any problems with this type of programming challenge before; however,
      >this is a very complex form. I save all of the form's data in a single
      >variable named $mailout and then call the mail() function with
      >$mailout as the body.
      >
      >The information I'm sending is about 1200 characters long. I noticed
      >that in the email the user receives, there is an odd break at about
      >character 1000. It reads something like this:
      >[/color]
      RFC 2821 (SMTP) specifies the email to have a line break after at most
      1000 chars.

      HTH, Jochen

      --
      Jochen Daum - Cabletalk Group Ltd.
      PHP DB Edit Toolkit -- PHP scripts for building
      database editing interfaces.
      http://sourceforge.net/projects/phpdbedittk/

      Comment

      • George Self

        #4
        Re: Email Messages With Odd Breaks

        On Tue, 27 Apr 2004 22:21:05 -0700, George Self <gself@gself.co m>
        wrote:
        [color=blue]
        >I'm creating a PHP form handler that will send an email to a user
        >based on form entries (a rather standard procedure). I've never had
        >any problems with this type of programming challenge before; however,
        >this is a very complex form. I save all of the form's data in a single
        >variable named $mailout and then call the mail() function with
        >$mailout as the body.
        >
        >The information I'm sending is about 1200 characters long. I noticed
        >that in the email the user receives, there is an odd break at about
        >character 1000. It reads something like this:
        >
        >Style: Red tu!
        > dor with attached garage
        >
        >Everything else looks correct. The first 1000 characters are right and
        >any remaining characters are right. It's just at about character 1000
        >I get an exclamation point and then the data continue on the next line
        >(with a small indent).
        >
        >I thought that maybe there was some sort of limit to the size of the
        >PHP variable, so I broke $mailout into two pieces, both well under the
        >magic size limit. That did not help.
        >
        >I thought that maybe the mail() function was somehow breaking up this
        >message, so I created a small routine to write the output directly to
        >sendmail. That didn't help.
        >
        >I wonder if this is a sendmail issue. Does anyone know of any reason
        >why I'm getting this odd break in my messages and how I can fix it?
        >
        >--George[/color]

        Thanks to both of you. I'll change my code and add the occasional
        break. I appreciate the help.

        Comment

        Working...