note 49356 added to function.mail

From: Date: Tue, 25 Jan 2005 12:18:25 +0000
Subject: note 49356 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-83921@lists.php.net to get a copy of this message
I looked for the possibility to send a HTML mail with specifying a TO adress in combination with a text in the form "To: name<email>", which is not allowed in the TO parameter of the mail function. The following solution works fine: $to = "george.bush@whitehouse.org"; $totext = "George W. Bush"; $headers = "MIME-Version: 1.0 \n" ; $headers .= "Content-Type: text/html; charset=iso-8859-1 \n"; $headers .= "To: $totext<$to> \n"; $message = "something meaningless"; mail("",$message,$headers); ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49356 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49356&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49356&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49356&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49356&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49356&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49356&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83921) next »