note 49356 deleted from function.mail by aidan

From: Date: Sun, 13 Feb 2005 08:12:26 +0000
Subject: note 49356 deleted from function.mail by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84915@lists.php.net to get a copy of this message
Note Submitter: dh at argosign dot de ---- 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);

« previous php.notes (#84915) next »