1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| <?PHP
include("jonction.php");
$email= $HTTP_POST_VARS["destinataire"];
$objet= $HTTP_POST_VARS["objet"];
$texte= $HTTP_POST_VARS["texte"];
$pj = $HTTP_POST_VARS["pj"];
$texte = htmlentities($texte);
$texte=nl2br($texte);
$image=" <DIV ALIGN=center> <A HREF=http://stella-corsica.com/index.php> <IMG SRC=http://stella-corsica.com/logo2.gif BORDER=4 WIDTH=125 HEIGHT=185> </A> </DIV>";
$message=$image."<BR><BR>".$texte;
$entete ="From: \"Stella-Corsica.com\"<info@stella-corsica.com>\n";
$entete .="Reply-To: \"info@stella-corsica.com\"<info@stella-corsica.com>\n";
/*
$entete .="MIME-Version: 1.0\n";
$entete .="Content-Type:multipart/mixed;";
$entete .="boundary=\"=a=a=a=a=a=a=a=\"\n\n";
$entete .="--=a=a=a=a=a=a=a=\n";
$entete .="Content-Type:text/plain;";
$entete .="charset=iso-8859-1\n";
$entete .="Content-Transfer-Encoding:8bit\n\n";
$entete .="--=a=a=a=a=a=a=a=\n";
$entete .="Content-Type:application/octet-stream;";
$entete .="name=\"$pj\"\n";
$entete .="Content-Transfer-Encoding:base64\n";
$entete .="Content-Disposition:attachment;";
$entete .="filename=\"$pj\"\n\n";
$fichier=fopen($pj,rb);
$data=fread($fichier,filesize($fichier));
$data=chunk_split(base64_encode($data));
$fclose($fichier);
$entete .="$data\n\n";
$entete .="--=a=a=a=a=a=a=a=--\n";
*/
$ok=mail("$email","$objet","$message","$entete");
header("location:admgest.php");
?> |
Partager