[Mail] Envoi d'e-mail en PHP
bonjour
j'ai crée un script d'envoi d'email php par la méthode suivante :
une page html nomée m.htm
son code est :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <html>
<head>
<title>adresse mail </title>
</head>
<body>
<form method="post" action="m.php">
Votre adresse mail<input type="text" name="mail"><br>
Sujet de votre message<input type="text" name="sujet"><br>
Votre message<br><textarea rows="9" name="message" cols="57"></textarea><br>
<input type="submit" value="Envoyez">
<input type="reset" value="Annulez">
</form>
</body>
</html> |
et ensuite une page php traitant le formulaire nomée m.php son code est :
Code:
1 2 3 4 5 6
| <?php
$mail=$_POST['mail'];
$sujet=$_POST['sujet'];
$message=$_POST['message'];
mail("x@y.z",$sujet,$message,"from :".$mail);
?> |
Jusqu'ici tout marche trés bien, mais quand j'ajoute un mail de remerciement :
mail("$mail","remerciement","Nous vous remercions pour votre participation","from :".x@y.z);
le script ne fonctionne pas. Merci de me porter aide.