php - I don't get why my form isn't working -



php - I don't get why my form isn't working -

this question has reply here:

php mail service form doesn't finish sending e-mail 19 answers

my code did work few minutes ago. didn't alter anything, tried 1 time again tests, nil working. wanted simple form email :

html

<form action="mail.php" method="post" id="inscription"> <input name="nom" type="text" id="nom" placeholder="nom"> <input name="prenom" type="text" id="prenom" placeholder="prénom"> <input name="email" type="email" id="email" placeholder="e-mail"> <input name="tel" type="tel" id="tel" placeholder="01.23.45.67.89"> <input name="company" type="text" id="company" placeholder="nom de l'entreprise"> <input name="nb-personne" type="text" id="nb-personne" placeholder="nombre de personne"> <textarea name="comment" cols="15" rows="6" id="comment"></textarea> <input type="submit" name="submit" value="je m'inscris*" class="submit"> </form>

php

$toemail = 'ptusseau@histrasbourg.com'; $emailsubject = 'inscription soiree bresilienne<hr/>'; $mailheader = "from: ".$_post["email"]."\r\n"; $mailheader .= "reply-to: ".$_post["email"]."\r\n"; $mailheader .="mime-version: 1.0\r\n"; $mailheader .="content-type: text/html; charset=utf=8\r\n"; $message_body = "nom: ".$_post["nom"].""; $message_body .= "prénom: ".$_post["prenom"].""; $message_body .= "email: ".$_post["email"].""; $message_body .= "tél: ".$_post["tel"].""; $message_body .= "entreprise: ".$_post["company"].""; $message_body .= "nombre de personne: ".$_post["nb-personne"].""; $message_body .= "commentaire: ".nl2br($_post["comment"]).""; mail($toemail, $emailsubject, $message_body, $mailheader); // mettre united nations merci.html include("merci.html"); exit(0);

i wanted create simple email, in html before new line (prenom, email, tel, etc.). don't know how do, don't understand .nl2br ... , doesn't send email anymore, anyway.

inspect, verify , filter post info see whether info coming through correctly verify can send mails server using , configuration (smtp etc.) correctly set up consider using mail service library instead of manually working error-prone mail service headers, body contents , involved your emails might classified spam , not getting through

php forms email nl2br

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -