note 35584 added to function.imap-mail-compose
| From: | thomas dot hebinck at digionline dot de | Date: | Sat, 06 Sep 2003 20:26:12 +0000 |
| Subject: | note 35584 added to function.imap-mail-compose | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55557@lists.php.net to get a copy of this message | ||
imap_mail_compose() uses \r\n at the end of each header (which is RFC conform) - but imap_mail() and
mail() just use \n when adding their headers. So you get mixed up EOLs.
When your email client gets trouble finding the beginning of your body, try this (took me half a
day):
$mail=imap_mail_compose($env,$body);
list($t_header,$t_body)=split("\r\n\r\n",$mail,2);
$t_header=str_replace("\r",'',$t_header);
$result=imap_mail($to,$subject,$t_body,$t_header);
----
Manual Page -- http://www.php.net/manual/en/function.imap-mail-compose.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35584
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35584&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35584&report=yes