By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,828 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,828 IT Pros & Developers. It's quick & easy.

Email Messages With Odd Breaks

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"George Self" <gs***@gself.com> a écrit dans le message news:
f7********************************@4ax.com...
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


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

--
denis
Jul 17 '05 #2

P: n/a
Hi George,

On Tue, 27 Apr 2004 22:21:05 -0700, George Self <gs***@gself.com>
wrote:
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:

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/
Jul 17 '05 #3

P: n/a
On Tue, 27 Apr 2004 22:21:05 -0700, George Self <gs***@gself.com>
wrote:
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


Thanks to both of you. I'll change my code and add the occasional
break. I appreciate the help.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.