Bonjour,
J'ai un petit soucis qui commence à m'énerver!!!
J'ai été sur plusieurs forums tester les différentes possibilités mais rien ne marche.
Je genere un mail html en php, il est visible et formater sur tous les navigateurs, sur Mail (client messagerie mac) mais ne se formate pas sous Outlook.
Toutes les balises html apparaissent même les headers.
Je ne sais plus quoi faire, si vous avez des idées merci.
$destinataire = "mail_AT_free.fr".", "; $destinataire .=$mail_franchise; // on envoie un mail $sujetmail = "** Commande fournitures **"; $msg ='<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//FR\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">'. "\r\n"; $msg.='<html xmlns="http://www.w3.org/1999/xhtml">'."\r\n"; //$msg.= '<html>'. "\r\n"; $msg.='<head>'. "\r\n"; $msg.='<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />'. "\r\n"; $msg.='<title>Récapitulatif de commande</title>'. "\r\n"; $msg.='</head> <body> <table width="90%" align="center"><tr><td> <table> <tr><td colspan="2" align="center"><img src="img/logo.gif"></td></tr>'. "\r\n"; $msg.='<tr><td colspan="2" align="left">Bonjour M. '.$nom.' '.$prenom.'</td></tr>'. "\r\n"; $msg.='<tr><td colspan="2" align="center">Vous venez d\'effectuer une commande, nous vous en remercions. Pour que celle-ci soit effective, vous devez la valider en cliquant ici. <br /><font color="#FF0000">'. "\r\n"; $msg.='Attention : Les commandes non validées seront effacées chaque fin de semaine.</font></td></tr> <tr><td colspan="2" align="center"><hr /></td></tr>'. "\r\n"; $msg.='<tr><td colspan="2">Récapitulatif de commande du '.$date.'</td></tr> <tr><td colspan="2">N° de facture : '.$num_facture.'</td></tr>'. "\r\n"; $prix_total=''; for($i=0;$i<count($aIdSvce);$i++){ $prix_total+=$aPrixsvce[$i]; $select="SELECT nom,prix FROM outil WHERE id='$aIdSvce[$i]'"; $resultat=mysql_query ($select,$link) or die ("<br>".mysql_error()); $col=mysql_fetch_array($resultat,MYSQL_ASSOC); $msg.='<tr><td colspan="2">'.$aQuantite[$i].' unités '.html_entity_decode(stripslashes($col['nom']),ENT_NOQUOTES).' x ' .$col['prix'].'€ = '.$aPrixsvce[$i].' € HT</td></tr>'. "\r\n"; } $prix_T=round($prix_total+(($prix_total*19.6)/100),2); $msg.='<tr><td colspan="2"><hr /></td></tr>'. "\r\n"; $msg.= '<tr align="right"><td>Montant total TTC* : '.$prix_T.' €</td><td></td></tr>'. "\r\n"; $msg.='<tr><td colspan="2"><font size="x-small">* Hors frais de port</font></td></tr>'. "\r\n"; $msg.='</table> </td></tr></table> </body> </html>'. "\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: webmaster_AT_free.com' . "\r\n"; //$headers .='Reply-To: webmaster_AT_example.com' . "\r\n"; //$headers .= 'X-Mailer: PHP/' . phpversion(); //$headers .='Content-Transfer-Encoding: 8bit'. "\r\n"; $message = wordwrap($msg, 70); if(!mail ($destinataire, $sujetmail, $message, $headers)){ echo 'L\'envoi de mail a échoué.<br /><a href="java script:history.back()">Retour à la page précédente</a>'; }