php mail function sometimes send blank emails -


i know how use php mail() function. works me. receiving blank emails no message body, subject mentioned in php mailer function blank email id. did javascript validation each , every form no field blank while submitting form.

after validation receiving blank email. can 1 please tell me why happening?

note: tried submit form blank spaces in text boxes blank spaces form not submitting because of javascript validation.

edit:

code used:

<?php   $to      = 'nobody@example.com';   $subject = 'the subject';   $message = 'hello';   $headers = 'from: webmaster@example.com' . "\r\n" .              'reply-to: webmaster@example.com' . "\r\n" .              'x-mailer: php/' . phpversion();    mail($to, $subject, $message, $headers);  ?> 

this example http://php.net/manual/en/function.mail.php

without code not possible check issue. below advice can use :

1) never use javascript validation, bypassed, client side not server side. use server side validation.

2) php mail function use, not feature rich. try using swift or phpmailer.

hope help.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -