View Single Post
  #2  
Old 08-13-2006, 08:05 AM
daffy daffy is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
daffy is on a distinguished road
Default

You are just doing a minor rewrite of the PHP mail function. I do not understand why you are including the globals. Unless you intend to use them you do not need them.

I also question adding the X-Mailer bit and the extra newlines. By putting in two newlines you are forcing everything below that line to be part of the email message body and NOT the header. I would just use:

function sendEmail($To, $From, $Subject, $Body)
{
mail($To, $Subject, $Body, "From: $From");
return true;
}

Less is better in email headers. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - The function efficient to send mail or not?
View Single Post
  #2  
Old 08-13-2006, 08:05 AM
daffy daffy is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
daffy is on a distinguished road
Default

You are just doing a minor rewrite of the PHP mail function. I do not understand why you are including the globals. Unless you intend to use them you do not need them.

I also question adding the X-Mailer bit and the extra newlines. By putting in two newlines you are forcing everything below that line to be part of the email message body and NOT the header. I would just use:

function sendEmail($To, $From, $Subject, $Body)
{
mail($To, $Subject, $Body, "From: $From");
return true;
}

Less is better in email headers. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote