note 53399 added to function.mail

From: Date: Tue, 31 May 2005 16:48:13 +0000
Subject: note 53399 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-89683@lists.php.net to get a copy of this message
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: <? $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... ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53399 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53399&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53399&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53399&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53399&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53399&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53399&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89683) next »