I have gotten my emails to work fine with hotmail/msn and I am now trying to get them to show up as not spam for gmail. The only emails I send are during user registration and account violations which are important that the user sees and does not over look them due to a spam folder...
Anyway, here is what I'm using currently.
PHP Code:$headers = "MIME-Version: 1.0" . "\r\n";
if($html == 'true')
{
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
} else {
$headers .= "Content-type: text/plain; charset=iso-8859-1" . "\r\n";
}
$headers .= "From: \"$from_name\" <" . $from . ">" . "\r\n";
$headers .= "To: $to" . "\r\n";
$headers .= "Reply-To: \"$from_name\" <" . $from . ">" . "\r\n";
$headers .= "X-Priority: 3" . "\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
$headers .= "X-Mailer: -Site Name Removed- PHP Mailer" . "\r\n";
if(!mail($to, $subject, $body, $headers))
{
error_msg($lang['Error'], $lang['Unable_To_Send_Email']);
}





Bookmarks