bonjour voilà j'ai encore quelque soucis mes les info passe maintenant je vous mais le code + le mail une fois reçu il ne s'affiche pas comme je le voudrais ?
<?php
session_start();
include("cssstyle/haut.php");
include("sources/config.php");
//-----------------------------------------------
//DECLARE LES VARIABLES
//-----------------------------------------------
$destinataire=$_SESSION['email_ano'];
$nom_expediteur=$_POST['name_con'];
$phone_expediteur=$_POST['phone_con'];
$email_expediteur=$_POST['email_con'];
$com_expediteur=$_POST['comment_con'];
$sujet=$_SESSION['ref_ano'];
$email_reply=$_SESSION['email_ano'];
//-----------------------------------------------
//GENERE LA FRONTIERE DU MAIL ENTRE TEXTE ET HTML
//-----------------------------------------------
srand((double)microtime()*1000000);
$frontiere = md5(uniqid(mt_rand()));
//-----------------------------------------------
//HEADERS DU MAIL
//-----------------------------------------------
$headers = 'From: "Nom" <'.$email_expediteur.'>'."\n";
$headers .= 'Return-Path: <'.$email_reply.'>'."\n";
$headers .= 'MIME-Version: 1.0'."\n";
$headers .= 'Content-Type: multipart/alternative; boundary="'.$frontiere.'"\n';
//-----------------------------------------------
//MESSAGE HTML
//-----------------------------------------------
$message .='\nThis is multi-part Message in MINE format.';
$message .= 'Content-Type: text/html; charset="iso-8859-1"'."\n";
$message .= 'Content-Transfer-Encoding: 8bit'."\n\n";
$message .= '<html><body>\n';
$message .= '<b>Réf annonce</b> :'.$sujet.'<br />\n';
$message .= '<b>Nom</b> :'.$nom_expediteur.'<br />\n';
$message .= '<b>Téléphone</b> :'.$phone_expediteur.'<br />\n';
$message .= '<b>Email</b> :'.$email_expediteur.'<br />\n';
$message .= '<b>Message</b> :'.$com_expediteur.'<br />\n';
$message .= '</body></html>\n';
$message .= '\n--'.$frontiere.'--\n end of the multi-part';
if(mail($destinataire,$sujet,$message,$headers))
{
echo'<script>
$(document).ready(function() {
$("#dialog").dialog({
modal: true,
opacity: .80,
});
});
setTimeout( function() {
window.location.href = ("http://www.h-immo.be/detail_anno.php?detail='.$_SESSION['detail'].'");
}, 5000 );
</script>
<div id="dialog" title=OK ENVOYER"><img src="cssstyle/imdesign/1.gif" width="24" height="24" border="0"><br />
Vous allez être rediriger
</div>';
}
else
{
echo'<script>
$(document).ready(function() {
$("#dialog").dialog({
modal: true,
opacity: .80,
});
});
setTimeout( function() {
window.location.href = ("http://www.'.$web_site.'/detail_anno.php?detail='.$_SESSION['detail'].'");
}, 5000 );
</script>
<div id="dialog" title="ERREUR ENVOIS"><img src="cssstyle/imdesign/1.gif" width="24" height="24" border="0"><br />
Vous allez être rediriger
</div>';
}
include("cssstyle/bas.php");
?>
voici a la réception
<html><body>\n<b>Réf annonce</b> :1NRHPW<br />\n<b>Nom</b> :paquot<br />\n<b>Téléphone</b> :019.32.28.74<br />\n<b>Email</b> :
[email protected]<br />\n<b>Message</b> :test contact annonce<br />\n</body></html>\n\n--04030c89b8186e0c95e77018a839e64a--\n end of the multi-part
bonjour voilà j'ai encore quelque soucis mes les info passe maintenant je vous mais le code + le mail une fois reçu il ne s'affiche pas comme je le voudrais ?
[php]<?php
session_start();
include("cssstyle/haut.php");
include("sources/config.php");
//-----------------------------------------------
//DECLARE LES VARIABLES
//-----------------------------------------------
$destinataire=$_SESSION['email_ano'];
$nom_expediteur=$_POST['name_con'];
$phone_expediteur=$_POST['phone_con'];
$email_expediteur=$_POST['email_con'];
$com_expediteur=$_POST['comment_con'];
$sujet=$_SESSION['ref_ano'];
$email_reply=$_SESSION['email_ano'];
//-----------------------------------------------
//GENERE LA FRONTIERE DU MAIL ENTRE TEXTE ET HTML
//-----------------------------------------------
srand((double)microtime()*1000000);
$frontiere = md5(uniqid(mt_rand()));
//-----------------------------------------------
//HEADERS DU MAIL
//-----------------------------------------------
$headers = 'From: "Nom" <'.$email_expediteur.'>'."\n";
$headers .= 'Return-Path: <'.$email_reply.'>'."\n";
$headers .= 'MIME-Version: 1.0'."\n";
$headers .= 'Content-Type: multipart/alternative; boundary="'.$frontiere.'"\n';
//-----------------------------------------------
//MESSAGE HTML
//-----------------------------------------------
$message .='\nThis is multi-part Message in MINE format.';
$message .= 'Content-Type: text/html; charset="iso-8859-1"'."\n";
$message .= 'Content-Transfer-Encoding: 8bit'."\n\n";
$message .= '<html><body>\n';
$message .= '<b>Réf annonce</b> :'.$sujet.'<br />\n';
$message .= '<b>Nom</b> :'.$nom_expediteur.'<br />\n';
$message .= '<b>Téléphone</b> :'.$phone_expediteur.'<br />\n';
$message .= '<b>Email</b> :'.$email_expediteur.'<br />\n';
$message .= '<b>Message</b> :'.$com_expediteur.'<br />\n';
$message .= '</body></html>\n';
$message .= '\n--'.$frontiere.'--\n end of the multi-part';
if(mail($destinataire,$sujet,$message,$headers))
{
echo'<script>
$(document).ready(function() {
$("#dialog").dialog({
modal: true,
opacity: .80,
});
});
setTimeout( function() {
window.location.href = ("http://www.h-immo.be/detail_anno.php?detail='.$_SESSION['detail'].'");
}, 5000 );
</script>
<div id="dialog" title=OK ENVOYER"><img src="cssstyle/imdesign/1.gif" width="24" height="24" border="0"><br />
Vous allez être rediriger
</div>';
}
else
{
echo'<script>
$(document).ready(function() {
$("#dialog").dialog({
modal: true,
opacity: .80,
});
});
setTimeout( function() {
window.location.href = ("http://www.'.$web_site.'/detail_anno.php?detail='.$_SESSION['detail'].'");
}, 5000 );
</script>
<div id="dialog" title="ERREUR ENVOIS"><img src="cssstyle/imdesign/1.gif" width="24" height="24" border="0"><br />
Vous allez être rediriger
</div>';
}
include("cssstyle/bas.php");
?> [/php]
voici a la réception
[quote]<html><body>\n<b>Réf annonce</b> :1NRHPW<br />\n<b>Nom</b> :paquot<br />\n<b>Téléphone</b> :019.32.28.74<br />\n<b>Email</b> :
[email protected]<br />\n<b>Message</b> :test contact annonce<br />\n</body></html>\n\n--04030c89b8186e0c95e77018a839e64a--\n end of the multi-part[/quote]