j'ai un soucis avec ma fonction sendmail, ça fonctionne mais...ça tombe systématiquement en spam
Peut-être que une personne ici saura m'aider ?
Voici le code
Code : Tout sélectionner
function sendmail_myrdv($to, $title, $content){
if(!empty($to) && !empty($title) && !empty($content))
{
$from = '[email protected]' . "\r\n" .
"Reply-To: [email protected]" . "\r\n" .
"X-Mailer: PHP/" . phpversion() ;
$subject = $GLOBALS['meta']['nom_site'] . ' : ' .$title;
$headers = "MIME-Version: 1.0" ."\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Return-Path: [email protected]\r\n";
$pictures = array();
$pictures["bandeau"] = $GLOBALS['meta']['adresse_site'] .'/IMG/bandeau.jpg';
// $corps = $content;
$ln = "\r\n";
$corps = '<table style="width: 800px; border: 0;">' .$ln;
$corps .= '<tr>' .$ln;
$corps .= '<td><img style="width: 800px; height: 200px;" alt="logo den" src="' .$pictures["bandeau"] .'" /></td>' .$ln;
$corps .= '</tr>' .$ln;
$corps .= '<tr><td colspan="6" style="text-align: center;">' .$title .'</td></tr>' .$ln;
$corps .= '<tr><td colspan="6">' .$content .'</td></tr>' .$ln;
$corps .= '<tr><td colspan="6">Merci et à bientôt</td></tr>' .$ln;
$corps .= '<tr><td colspan="6">Service rendez-vous</td></tr>' .$ln;
$corps .= '</table>' .$ln;
if(mail($to, $subject, $corps, $headers))
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}