RE: [PHP] Multiple emails.
| From: | John Ashton | Date: | Tue, 02 Jan 2001 22:26:57 +0000 |
| Subject: | RE: [PHP] Multiple emails. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32387@lists.php.net to get a copy of this message | ||
Right From The Manual
----------------------------------
John Ashton
john@thedatasource.net
Sending complex email.
/* recipients */
$recipient .= "Mary <mary@u.college.edu>" . ", " ; //note the comma
$recipient .= "Kelly <kelly@u.college.edu> . ", ";
$recipient .= "ronabop@php.net";
/* subject */
$subject = "Birthday Reminders for August";
/* message */
$message .= "The following email includes a formatted ASCII table\n";
$message .= "Day \t\tMonth \t\tYear\n";
$message .= "3rd \t\tAug \t\t1970\n";
$message .= "17rd\t\tAug \t\t1973\n";
/* you can add a stock signature */
$message .= "--\r\n"; //Signature delimiter
$message .= "Birthday reminder copylefted by public domain";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers .= "From: Birthday Reminder <birthday@php.net>\n";
$headers .= "X-Sender: <birthday@php.net>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <birthday@php.net>\n"; // Return path
for errors
/* If you want to send html mail, uncomment the following line */
// $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
// Mime type
$headers .= "cc:birthdayarchive@php.net\n"; // CC to
$headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.net\n";
// BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
>
>
>
> > -----Original Message-----
> > From: Ömer Barlas [mailto:obarlas@efes.net.tr]
> > Sent: January 2, 2001 4:58 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Multiple emails.
> >
> >
> > Maybe it has been asked before but this is a great problem for me.
> > How can I send an email to multiple addresses?
> > No loops, just in one simple mail() command.
> >
> > Thanks.
> >
> > -------------------------------
> > Omer Barlas
> > obarlas@efes.net.tr
> > -------------------------------
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >