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
| $to = $val[email];
// Subject
$subject = $_POST['titre'] ;
// clé aléatoire de limite
$boundary = md5(uniqid(microtime(), TRUE));
// Headers
$headers = 'From: catalogue@monsite.org'."\r\n";
$headers .= 'Mime-Version: 1.0'."\r\n";
$headers .= 'Content-Type: multipart/mixed;boundary='.$boundary."\r\n";
$headers .= "\r\n";
// Message
$msg = 'Texte affiché par des clients mail ne supportant pas le type MIME.'."\r\n\r\n";
// Message HTML
$msg .= '--'.$boundary."\r\n";
$msg .= 'Content-type: text/html; charset=utf-8'."\r\n\r\n";
$msg .= '<img src="http://monsite/wordpress/upload/bandeau1.png" alt="Goodplanet.org" />'."\r\n\n\n\n\n";
$msg .= '<br><font face="Verdana, Arial, Helvetica, sans-serif">';
$msg .= $_POST['FCKeditor2']."\r\n\n";
$msg .= '<b>Bonne lecture sur <a href="www.monsite.org"><font color="#c2851b">www.monsite.org</font></a></b><br><br>'."\r\n";
$msg .= '<br><br><em><font size="1">Si vous ne souhaitez plus recevoir la newsletter, envoyez "désinscription" à moi@monsite.org</font></em>';
$msg .= '</font>'."\r\n\n";
$msg .= '--'.$boundary."\r\n";
// Function mail()
$mail=mail($to, $subject, $msg, $headers); |
Partager