Mes mail emis depuis mon serveur son considérés comme du spam (yahoo, htomail, etc...)
Voici le code que j'utilise pour envoyer des mails :
Voici le code que j'utilise pour envoyer des mails :
Code:
function mail_to($to, $msg_sujet, $msg_html, $msg_txt)
{
$boundary = "-----=" . md5( uniqid ( rand() ) );
$headers = "Reply-to: \"Camelya\" <infos@camelya.com>\n";
$headers .= "From: \"Camelya\"<infos@camelya.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"";
$destinataire = $to;
$subject = $msg_sujet;
$message_txt = $msg_txt;
$message_html = $msg_html;
$message = "This is a multi-part message in MIME format.\n\n";
$message .= "--" . $boundary . "\n";
$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
// $message .= "Content-Transfer-Encoding: quoted-printable\n\n";
$message .= $message_txt;
$message .= "\n\n";
$message .= "--" . $boundary . "\n";
$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
//$message .= "Content-Transfer-Encoding: quoted-printable\n\n";
$message .= $message_html;
$message .= "\n\n";
$message .= "--" . $boundary . "--\n";
return mail($destinataire, $subject, $message, $headers);
}