Re: mail() function
| From: | Patrick Schnegg | Date: | Tue, 04 Mar 2003 13:24:10 +0000 |
| Subject: | Re: mail() function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138097@lists.php.net to get a copy of this message | ||
Just in case you don't know, you can easily make an array out of your string
of emails by exploding using the commas as separators:
$emails = explode (",", $stringOfEmails);
"Patrick Schnegg" <info@killersushi.ch> wrote in message
news:20030304131009.6596.qmail@pb1.pair.com...
> The mail() function will only send one mail at a time, to send multiple
> mails you would write a loop like this (presuming you had your mail
> addresses ready in an array called $emails):
>
> foreach ($emails as $email) {
> mail($email, "your subject", "your message");
> }
>
> "Denis L. Menezes" <menezesd@singnet.com.sg> wrote in message
> news:002c01c2e24d$9989a890$1e02a8c0@pcdenisxp...
> Hello friends,
>
> Can the mail() function send emails to multiple addresses which are
> formatted as follows :
>
> person1@hotmail.com,person2@yahoo.com,person3@yahoo.com..... etc with a
> comma or a semicolon between them?
>
> Thanks
> Denis
>
>
>
>