note 53399 deleted from function.mail by danbrown
| From: | danbrown@php.net | Date: | Mon, 20 Jun 2011 15:13:07 +0000 |
| Subject: | note 53399 deleted from function.mail by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180723@lists.php.net to get a copy of this message | ||
Note Submitter: javier at zincro dot com
----
This might be something obvious, but it gave me a lot of headache to find out:
If you use an ascii char#0 in the "string mensaje" parameter, it will truncate the message
till that point, (this happened to me sending a message read from a file)
For example:
<?php
$hs_email="blabla@blabla.com";
$hs_asunto="a message for you";
$hs_contenido="beginofcontent_";
$hs_contenido.=chr(0);
$hs_contenido.="_endofcontent";
mail($hs_email,$hs_asunto,$hs_contenido);
?>
Will result in an email that only contains the string:
beginofcontent_
Anyway, just in case it can save someone some time...