RE: [PHP-DB] Re: Breaking up new lines for e-mail
| From: | Gavin Amm | Date: | Wed, 08 Jan 2003 00:41:58 +0000 |
| Subject: | RE: [PHP-DB] Re: Breaking up new lines for e-mail | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24632@lists.php.net to get a copy of this message | ||
Thanks for your reply.
Word wrap seems to be ok.
What does seem to be a problem is the line breaks...
For example, they might type in the following (between the dashed
lines):
------------------------------
Hi,
Please send me some info.
Thanks,
Gav
------------------------------
When I receive the mail, however, it looks like this:
------------------------------
Hi, Please send me some info. Thanks, Gav
------------------------------
This is fine for such a short message, but lengthy messages would be
horrid to read if all the line breaks were taken out...
Cheers,
Gav
-----Original Message-----
From: Manuel Lemos [mailto:mlemos@acm.org]
Sent: Wednesday, 8 January 2003 11:32 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: Breaking up new lines for e-mail
Hello,
On 01/07/2003 10:11 PM, Gavin Amm wrote:
> Would someone mind pointing me to a function, or some code, or give me
> a seudo-code start for the following:
>
> I'm using the mail() function.
> If someone submits the form with text in the multi-line textarea, any
> carrige returns (ie, by pressing ENTER) are taken out & the body is
> sent as a single line. I'm sending the e-mail in plain text.
There is wordwrap() but that function is broken in several PHP versions
and even had a buffer overflow security problem, so I gave up on using
it at all.
What I use is a function that is part of a message composing and sending
class that basically does the same as wordwrap except that it works well
in all PHP versions without any security problems. Check out the
function WrapText() of the email_message_class here:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php