1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
$to = "xx@xx.com";
$headers = "From:".$email."\n";
$subject = "Demande de réservation n° $numero_cmd [A TRAITER]";
$boundary = "----=".md5(uniqid(mt_rand()));
$headers .= "MIME-Version: 1.0\nContent-Type: multipart/alternative;\n\t boundary=\"$boundary\"\nThis part of the E-mail should never be seen. If you are reading this, consider upgrading your e-mail client to a MIME-compatible client. \r\n";
$head_txtbrut = "..";
$corps_txtbrut = "..";
$head_html = "..";
$corps_html = "..";
$email_txtbrut = $head_txtbrut.$corps_txtbrut;
$email_html = $head_html.$corps_html;
$mail_texte = "--$boundary\nContent-Type: text/plain;\n\t charset=\"utf-8\"\nContent-Transfer-Encoding: 8bit\n\n".$email_textbrut."\r\n";
$mail_html = "--$boundary\nContent-Type: text/html;\n\t charset=\"utf-8\"\nContent-Transfer-Encoding: 8bit\n\n".$email_html."\r\n--$boundary--";
$content = $mail_texte.$mail_html;
$post = mail("$to" , "$subject" , "$content" , "$headers"); |
Partager