note 47390 added to function.mail
| From: | info29 at pedrofreire dot com | Date: | Mon, 15 Nov 2004 00:08:03 +0000 |
| Subject: | note 47390 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-80529@lists.php.net to get a copy of this message | ||
Under Windows, because PHP is talking to an SMTP server directly, you need to perform
"dot-stuffig", i.e., when a line of body text starts with a dot ("."), replace
that with two dots.
SMTP will eat away the first dot to transmit the line correctly, but if you do not add the second
dot, your original email will either be broken (dots missing) or crippled (a line with a single dot
ends the email, for SMTP). This means broken attachments, etc...
If you're using
mail( $to, $subj, $body );
add this line before that:
$body =& str_replace( "\r\n.", "\r\n..", $body );
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47390
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47390&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47390&report=yes
Search -- http://master.php.net/manage/user-notes.php