On 24-Mar-2003 Philip J. Newman wrote:
> $headers .= "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "From: ".$from_name." <".$from_address.">\r\n";
> $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
> $headers .= "X-Priority: 3\r\n";
> $headers .= "X-MSMail-Priority: Normal\r\n";
> $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
> 
> Is this about all i need to send a mail in PHP excluding the mail();
> 
> 

More than enough.
Couple of thoughts ...

Drop the X-Priority and X-MSMail-Priority. Those are the default values
and thus un-necessary.
Also the <crlf> is over kill; a simple \n will do just fine.

----

The way I usually do it:

$adminemail='Foobaz Administration <[EMAIL PROTECTED]>';
$theprgmr='<[EMAIL PROTECTED]>';

$headers =array(
    'List-Id' => SITENAME,
    'Cc' => "$adminemail, <[EMAIL PROTECTED]>",
    'Sender' => "$adminemail",
    'Reply-To' => "$adminemail",
    'Bcc' => "$theprgmr",
    'From' => "$adminemail"
);

$mailhdrs='';

foreach($headers as $k => $v) {
    $mailhdrs .=sprintf("%s: %s\n", $k, $v);
}

 mail($mailto, $mailsubj, $mailmsg, $mailhdrs);

> 
> ------
> Philip J. Newman.
> Head Developer
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Oh, and I hope you're going to consider a multipart/alternative message
body. HTML-only e-mail is evil.

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to