note 67128 added to ref.mail

From: Date: Sat, 03 Jun 2006 16:08:52 +0000
Subject: note 67128 added to ref.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-113128@lists.php.net to get a copy of this message
Hi, I'm trying to make a email form, but I keep getting this error, hope someone can tell me what is the problem, and I also I have posted the php and html I made here, so hoping someone can help me to take a look....thank you so much for your help and your time. ERROR: Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in e:\virtualhost\domains\house\INetPub\wwwroot\mailer.php on line25 Warning: Cannot modify header information - headers already sent by (output started at e:\virtualhost\domains\house\INetPub\wwwroot\mailer.php:25) in e:\virtualhost\domains\house\INetPub\wwwroot\mailer.php on line 27 My PHP file: <?PHP $to = "123@yahoo.com"; $subject = "Order"; $headers = "From: Green Customer"; $forward = 1; $location = "thanks.htm"; $date = date ("l, F jS, Y"); $time = date ("h:i A"); $msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n"; if ($_SERVER['REQUEST_METHOD'] == "POST") { foreach ($_POST as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; } } else { foreach ($_GET as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; } } mail($to, $subject, $msg, $headers); if ($forward == 1) { header("Location:$location"); exit; } else { echo "Thank you for submitting our form. We will get back to you as soon as possible."; } ?> My HTML file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>※ Welcome 2 Green ※</title> <meta http-equiv="Content-Type" content="text/html; charset=big5"> </head> <body> <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><form action="mailer.php" method="post"> <input type="hidden" name="usernum" value="314041547" /> <input type="hidden" name="cpv" value="2" /> <div style="padding: 2px;"> <div style="font: normal 11px Arial, Sans-Serif;">Name:<br> <input type="text" name="name" height="10" style=" font: normal 11px Arial, Sans-Serif;"> </div> <div style="padding-top: 8px; font: normal 11px Arial, Sans-Serif;">E-Mail:<br> <input type="text" name="email" height="10" style=" font: normal 11px Arial, Sans-Serif;"></div> <div style="padding-top: 8px; font: normal 11px Arial, Sans-Serif;">Phone:<br> <input type="text" name="email" height="10" style=" font: normal 11px Arial, Sans-Serif;"></div> <div style="padding-top: 8px; font: normal 11px Arial, Sans-Serif;">Event:<br> <select name="country" height="10" style=" font: normal 11px Arial, Sans-Serif;"> <option selected="true">Chooes your Event</option> <option>Golf</option> </select></div> <div style="padding-top: 8px; font: normal 11px Arial, Sans-Serif;">Comments:<br> <textarea cols="80" rows="10" name="comments" style=" font: normal 11px Arial, Sans-Serif;">Type your comments here.</textarea></div> <div style="padding-top: 8px; font: normal 11px Arial, Sans-Serif;"></div> <br> <input type="submit" name="submit" value="Submit"><input type="reset" name="reset" value="Reset" style="margin-left: 10px;"> </form> </td> </tr> </table> </body> </html> ---- Server IP: 202.181.244.117 Probable Submitter: 221.127.247.81 ---- X-Spam-Status: Yes, hits=6.7 required=5.0 tests=BUGGY_CGI,DATE_MISSING, FROM_NO_LOWER,HTML_50_60,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.mail.php Edit -- http://master.php.net/note/edit/67128 Del: integrated -- http://master.php.net/note/delete/67128/integrated Del: useless -- http://master.php.net/note/delete/67128/useless Del: bad code -- http://master.php.net/note/delete/67128/bad+code Del: spam -- http://master.php.net/note/delete/67128/spam Del: non-english -- http://master.php.net/note/delete/67128/non-english Del: in docs -- http://master.php.net/note/delete/67128/in+docs Del: other reasons-- http://master.php.net/note/delete/67128 Reject -- http://master.php.net/note/reject/67128 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#113128) next »