The best place to get PHP information is to sign up to one of the PHP.net
lists

The example here comes from the PHP documentation:

/* recipients */
$recipient .= "Mary <[EMAIL PROTECTED]>" . ", " ; //note the comma
$recipient .= "Kelly <[EMAIL PROTECTED]> . ", ";
$recipient .= "[EMAIL PROTECTED]";

/* 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 <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <[EMAIL PROTECTED]>\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:[EMAIL PROTECTED]\n"; // CC to
$headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; // BCCs to

/* and now mail it */
mail($recipient, $subject, $message, $headers);

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Mark Derricutt
> Sent: Thursday, 11 January 2001 01:18
> To: Multiple recipients of list offtopic
> Subject: [DUG-OFFTOPIC]: html email...
>
>
> hiya, just a quick offtopic post, i'm writing a small cgi/php script that
> sends out an email, I was wonder how I go about sending an HTML email?
> How do I lay out the content?  Do I have to do it all as a MINE message
> somehow?
>
> ------------------------------------------------------------------
> ---------
>   New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to