Re: Multiple recipients with mail();
| From: | Dallas Thunder | Date: | Tue, 03 Sep 2002 01:07:14 +0000 |
| Subject: | Re: Multiple recipients with mail(); | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15643@lists.php.net to get a copy of this message | ||
Read the manual at http://www.php.net/manual/en/function.mail.php
and see
Example 4. Sending complex email.
"Davy Obdam" <davy@davyobdam.com> wrote in message
news:000301c252e0$8d56e7b0$9600000a@davy...
> Hi
>
> I have this piece of script on my site. It sends e-mail from the
> feedbackform. I can only send e-mail to one recipient, but i would like
> to send this e-mail to multiple recipients. Here is my code, i hope
> someone can help me out. Thanks already!
>
> //Send e-mail from feedbackform
> //recipients
> $recipients="me@somedomain.com";
> //Subject
> $subject="Reaction from website";
> //Message
> $message="Reaction from website:\n\nName: $name\nAdres: $adres\nZipCode:
> $zip\nCity: $city\nPhone: $phone \nEmail:
> $email\n\nComments:\n\n$comments\n";
> //headers
> $headers="From:$name <$email>\n";
> //verstuur de e-mail
> $result= mail($recipients,$subject,$message,$headers);
> //Controleer of e-mail verstuur is
> if(!$result)
> {
> //Sending has failed
> echo "Sending your e-mail has failed<br><br>";
> echo "<a href=javascript:history.go(-1)>Back</a>\n";
> } else {
> //Send succesfully
> echo "<b>Your e-mail is send</b><br>\n";
> echo "Thanks for your time<br><br>";
> echo "<a href=index.php>Back</a>\n";
> }
>
> Thanks:-)
>
> Greetings
>
> Davy Obdam
> mailto:info@davyobdam.com
> url: http:///www.davyobdam.com
>
>