|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-29 00:31 UTC] albaity at php4web dot 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
<? 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); ?>PLEASE don't use the 'Add comment' link!!! It's your own report, use the 'Edit submission' ALWAYS. Anyway, this works fine for me: mail('"someone somehwere" <someone@somewhere.com>', 'subject', 'message');Does this work: <?php mail('', 'subject', 'message', "To: \"Some Name\" <someone@somehwere.com>"); ?>