Bonjour,
je suis en train de développer un formulaire en php, jusqu'à là pas de problème, le seul point, et dieu c'est qu'il est capital, c'est que lorsque je remplis le formulaire et l'envoie, je ne réceptionne pas les mails.
Je suis hébergé chez Amen, le service php 5.2.5 extension isapi est bien pris en charge.
Je vous joins le code de ma source php
PHP
<?php
$ToEmail = 'info@hbw-technology.com';
$EmailSubject = 'Site contact form ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
// collect data
$body = "";
foreach($_POST as $key => $val)
{
if($key != 'captcha')
$body .= ucfirst($key).": ".$val."\r\n";
}
// construct MIME PLAIN Email headers
$header = "MIME-Version: 1.0\n";
$header .= "Content-type: text/plain; charset=utf-8\n";
$header .= "From: $from_name <$from>\r\nReply-To: $from_name <$from>\r\nReturn-Path: <$from>\r\n";
// send email
$mail_sent = mail($to, $subject, $body, $header);
?>
Suivi de l'intégration dans le html.
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::: HBW TECHNOLOGY- HEALTH, BEAUTY & WELLNESS - Contact :::</title>
<meta name="keywords" content="Free CSS Template, Architect Website, XHTML, CSS" />
<meta name="description" content="Architect is a free CSS template or a free XHTML CSS layout for everyone." />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<link href="fullsize/fullsize.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/menu_style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/core.js"></script>
<script type="text/javascript" src="pngFix/jquery.pngFix.js"></script>
<script type="text/javascript" src="prettyphoto/js/jquery.prettyPhoto.js"></script>
</style>
<style type="text/css">
<!--
body {
background-image: url(images/fd-bkgnd.gif);
}
-->
</style>
<link href="css/CONTACT.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a {
font-family: Arial, Helvetica, sans-serif;
}
a:active {
color: #666666;
}
-->
</style></head>
<body>
<div id="templatemo_container">
<div id="templatemo_header">
<div id="templatemo_header_logo">
</div>
<div class="menu">
<ul>
<li><a href="index.html" target="_self" >Home</a>
</li>
<li><a href="r2-societe.html" target="_self" >La société</a>
</li>
<li><a href="r3-produits.html" target="_self" >Gamme produits</a>
<ul>
<li><a href="produits-huniq.html" target="_self">Huniq</a></li>
<li><a href="produits-hipulse.html" target="_self">Hipulse Star Med</a></li>
<li><a href="produits-cultra.html" target="_self">Cultra</a></li>
<li><a href="produits-h2ojet.html" target="_self">H2O Jet</a></li>
<li><a href="produits-table.html" target="_self">Table traitement prestige</a></li>
<li><a href="produits-lymphodrain.html" target="_self">Lymphodrain</a></li>
<li><a href="produits-gymplate.html" target="_self">Gymplate</a></li>
<li><a href="produits-vibrasens.html" target="_self">Vibrasens</a></li>
<li><a href="produits-kineo.html" target="_self">Kinéo</a></li>
<li><a href="produits-technoswing.html" target="_self">Technoswing</a></li>
</ul>
</li>
<li><a href="r4-marketing-comm.html" target="_self" >Marketing/Communication</a>
<ul>
<li><a href="r4-marketing-.html" target="_self">Marketing</a></li>
<li><a href="r4-event.html" target="_self">Evénementiel</a></li>
<li><a href="r4-edition.html" target="_self">Edition</a></li>
<li><a href="r4-multimedia.html" target="_self">Multimédia</a></li>
</ul>
</li>
<li><a href="r3-positive-ageing.html" target="_self" >Positive Ageing : le concept</a>
</li>
<li><a href="r6-contact.html" target="_self" >Contact</a>
</li>
</ul>
<div id="left">
<div id="contact_form">
<h1>Contactez-nous</h1>
<p>Pour nouc contacter, veuillez remplir le formulaire ci-dessous. Merci</p>
<form action="sendContact.php" method="post" name="contact" id="contact" onsubmit="return sendContact();">
<p>
<label for="name" id="lname">Nom et prénom:</label>
<input type="text" class="text" name="name" id="name" onfocus="input_focus('name');" onblur="input_blur('name');" />
</p>
<p>
<label for="email" id="lemail">Email :</label>
<input type="text" class="text" name="email" id="email" onfocus="input_focus('email');" onblur="input_blur('email');" />
</p>
<div class="x"></div>
<p class="error" id="email-error">Vous devez obligatoirement mettre votre email.</p>
<p>
<label for="category" id="lcategory">Sujet :</label>
<select name="category" id="category" onfocus="input_focus('category');" onblur="input_blur('category');">
<option value="Techno">Technologies HBW</option>
<option value="Communication & marketing">Communication & marketing</option>
<option value="Service Commercial">Service Commercial</option>
<option value="Divers">Divers</option>
</select>
</p>
<p>
<label for="message" id="lmessage">Message:</label>
<textarea name="message" id="message" onfocus="input_focus('message');" onblur="input_blur('message');"></textarea>
</p>
<div class="x"></div>
<p class="error" id="message-error">Vous devez mettre un message.</p>
<p>
<label for="captcha" id="lcaptcha"></label>
<input type="text" class="text" name="captcha" id="captcha" onfocus="input_focus('captcha');" onblur="input_blur('captcha');" />
</p>
<div class="x"></div>
<p class="error" id="captcha-error">Êtes-vous sûr du résultat ?</p>
<script type="text/javascript">
generate_captcha('lcaptcha');
</script>
<div class="x"></div>
<input type="submit" class="submit" name="send_contact" value="Envoyez votre message" />
</form>
<span id="contact-back"> Vous pouvez <a href="index.html" class="read-more">revenir</a></span>
</div>
<div id="message_sent" style="display:none;">
<h1>Votre message a bien été envoyé</h1>
<p>Nous vous contacterons dans les plus brefs délais. Merci.</p>
<p>Vous pouvez <a href="index.html" class="read-more">revenir</a> sur la Homepage.</p>
</div>
</div>
<div id="right">
<p> </p>
<p> </p>
<p> </p>
<p>Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, litot Europa usa li sam vocabular.<br />
<br />
<img src="images/cica-thumb.jpg" width="270" height="133" /> </p>
<br />
<h3>Info adresse :</h3>
<p>
email: <strong><a href="mailto:info@hbw-technology.com">info@hbw-technology.com</a></strong><br />
Tel.: <strong>+33 (0)493 613 041 </strong><br />
Addresse : <strong>2229 Route des Crêtes </strong><br />
Code postal : <strong>06560 Sophia-Antipolis </strong><br />
Région : <strong>Provence Alpes Côte d'Azur<br />
</strong>Pays: <strong>France</strong> </p>
<br />
<iframe width="270" height="230" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="
https://www.google.fr/maps?f=q&source=s_q&hl=fr&geocode&q=2229+Route+des+Cr%C3%AAtes,+Valbonne&sll=46.75984,1.738281&sspn=12.708677,33.815918&ie=UTF8&hq&hnear=2229+Route+des+Cr%C3%AAtes,+06560+Valbonne,+Alpes-Maritimes,+Provence-Alpes-C%C3%B4te+d "></iframe>
<p><br />
<small><a href="
https://www.google.fr/maps?f=q&source=embed&hl=fr&geocode&q=2229+Route+des+Crêtes,+Valbonne&sll=46.75984,1.738281&sspn=12.708677,33.815918&ie=UTF8&hq=&hnear=2229+Route+des+Crêtes,+06560+Valbonne,+Alpes-Maritimes,+Provence-Alpes-Côte+d%27Azur&ll=43.627689,7.042665&spn=0.007455,0.025749&z=14&iwloc=A " target="_blank" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>
</p>
<p> <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</p>
</div>
<div class="x"></div>
<div class="break no-border"></div>
</div>
<!-- footer -->
<div class="cleaner"></div>
</div>
<div id="templatemo_footer">Copyright © 2010 HBW TECHNOLOGY | Designed by HBW | <a href="mailto:info@hbw-technology.com">info@hbw-technology.com</a> </a></div>
</div>
<!-- End Of Container -->
</body>
Merci pour votre aide... si vous avez des idées ou tuyaux
Afficher la suite