Send Email with simple php function
it is header not contain full info needed by email service prover like Gmail and Yahoo ...etc
In this Article will be write an function like mail() function put it will send your emails to the inbox not to the spam. No more emails in spam section. Hotmail proves more strong rules by it's smart scan system, so try our function and your emails will not catch by the smart scan.
This the function:
PHP Code:
function send_mail($to,$from,$subject,$msg){
$headers ="MIME-Version: 1.0 \r\n";
$headers.="from: $from $subject \r\n";
$headers.="Content-type: text/html;charset=utf-8 \r\n";
$headers.="X-Priority: 3\r\n";
$headers.="X-Mailer: smail-PHP ".phpversion()."\r\n";
$msg ='
<div style="text-align:left">
<h2>'.$subject.'</h2>
'.$msg.'
</div>
';
if( mail($to,$subject,$msg,$headers) ){
return true;
}else{
return false;
}
}