Page 1 of 1

mail() Function truncating the body text

Posted: Wed May 21, 2003 10:39 pm
by SBukoski
I have a PHP script that I could swear was working properly before. I just noticed the other day now that it is sending out e-mails using the mail() function and always truncates the body after so many characters. After saving the e-mails to HTML and looking at them, it's always exactly 1,100 bytes.

Does anyone have any idea why the body text could be getting truncated?

Posted: Thu May 22, 2003 5:27 am
by lcidw
Some mailservers block messages with more than 1024 Characters in a single line.

Solution: just add a simple linebreak (\n) after the last space before each character 1024

You could possibly use wordwrap() for this.

Posted: Thu May 22, 2003 7:33 am
by SBukoski
Thanks a lot! That did the trick...