#21930 [Com]: TO NAME not work

From: Date: Wed, 29 Jan 2003 07:57:43 +0000
Subject: #21930 [Com]: TO NAME not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-31542@lists.php.net to get a copy of this message
ID: 21930 Comment by: albaity@php4web.com Reported By: albaity@php4web.com Status: Feedback Bug Type: Mail related Operating System: Windows 2000 Proffiessional PHP Version: 4.3.0 New Comment: <? function SendHtmlMsg($To,$From,$Sendername,$Receivername,$subject,$msg){ mail($To, $subject, $msg, "To: $Receivername <$To>\n" . "From: $Sendername <$From>\n" . "X-Mailer: PHP 4.3\n". "MIME-Version: 1.0\n" . "Content-type: text/html; charset=-1256"); } $From="info@site.com"; $Sendername = "Person"; $To = "albaity@php.net"; $Receivername = "Test Person"; $subject ="Test"; $msg = "Test<br/>Test"; SendHtmlMsg($To,$From,$Sendername,$Receivername,$subject,$msg); ?> Previous Comments: ------------------------------------------------------------------------ [2003-01-29 01:06:02] sniper@php.net Please add a short example script here which clearly shows your problem. ------------------------------------------------------------------------ [2003-01-29 00:33:40] albaity@php4web.com I want to comment that I USE the ISP SMTP , not IIS SMTP and also not work.. ------------------------------------------------------------------------ [2003-01-29 00:31:29] albaity@php4web.com I take details from : http://www.php.net/manual/en/function.mail.php because it happen with me also the smtp server with iis5 does not support a TO NAME, you can send it to an email but not along with a name. to say $to = "Miki <Miki@email.com>"; would not be accepted and you will get an error 501 Invalid address. if you see this error, just try NOT sending emails with a TO name, only the email should be entered ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21930&edit=1

« previous php.bugs (#31542) next »