note 98714 rejected from function.mail by danbrown

From: Date: Fri, 02 Jul 2010 12:49:56 +0000
Subject: note 98714 rejected from function.mail by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170652@lists.php.net to get a copy of this message
Note Submitter: moyalvivek at yahoo dot co dot in ---- Hello i am new to PHP my query is related to mail() when i send the mail i got an error Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\EmailApplication\InformationSend.php on line 14 my code is <html> <body> <?php $name = $_POST['firstName']." ".$_POST['lastName']; $email = $_POST['email']; $ask = $_POST['ask']; $to="moyalvivek@yahoo.co.in"; $sub="Testing"; $from="vivekmoyal28@gmail.com"; $headers = "From: vivekmoyal28@gmail.com; ?> <?php mail($to,$sub,$ask,$headers); echo "Mail Sent"; ?> <?php echo "My name is : ".$name .'<br/>'; echo "My email is : ".$email. '<br/>'; echo "Ask me : ".$ask; ?> </body> </html> please tell me where is the error and how to set header in php.ini

« previous php.notes (#170652) next »