note 108340 added to function.mail
| From: | MarcParillo | Date: | Wed, 18 Apr 2012 13:27:44 +0000 |
| Subject: | note 108340 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187221@lists.php.net to get a copy of this message | ||
If you follow the suggested format for the $to field, you can list multiple addresses in a
comma-delimited string with spaces.
The spaces could be an issue if you're experiencing a similar problem. I was unable to send an
e-mail to multiple addresses using that format. It started working for me when I removed all of the
spaces in the $to string.
Example:
<?php
$to = 'nobody@example.com,anotheruser@example.com,yetanotheruser@example.com'; // no
spaces
mail($to, 'the subject', 'the message');
?>
----
Server IP: 69.147.83.197
Probable Submitter: 173.213.212.231
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/108340
Del: integrated -- https://master.php.net/note/delete/108340/integrated
Del: useless -- https://master.php.net/note/delete/108340/useless
Del: bad code -- https://master.php.net/note/delete/108340/bad+code
Del: spam -- https://master.php.net/note/delete/108340/spam
Del: non-english -- https://master.php.net/note/delete/108340/non-english
Del: in docs -- https://master.php.net/note/delete/108340/in+docs
Del: other reasons-- https://master.php.net/note/delete/108340
Reject -- https://master.php.net/note/reject/108340
Search -- https://master.php.net/manage/user-notes.php