note 51136 rejected from function.mail by betz
| From: | betz@php.net | Date: | Mon, 21 Mar 2005 13:46:51 +0000 |
| Subject: | note 51136 rejected from function.mail by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-86744@lists.php.net to get a copy of this message | ||
Note Submitter: milenzlatkov at yahoo dot com
----
<?PHP
$feedname=$HTTP_POST_VARS['feedname'];
$feedmail=$HTTP_POST_VARS['feedmail'];
$feedback=$HTTP_POST_VARS['feedback'];
$toaddress="milenzlatkov@yahoo.com";
$subject="Feedback from Milen web site :)";
/*$mailcontent='Customer name: '.$feedname."\n"
.'Customer e-mail: '.$feedmail."\n"
."Customer Comments: \n".$feedback."\n";*/
$mailcontent="Line 1\nLine 2\nLine 3";
$fromaddress='From: webserver@example.com';
//mail($toaddress,$subject,$mailcontent);
//mail('milenzlatkov@yahoo.com','Feedback','Line 1\nLine 2\nLine 3');
if (mail($toaddress,$subject,$mailcontent)) {
echo 'Success';
} else {
echo 'Failed';
}
?>
RESULT:
Content-type: text/html
X-Powered-By: PHP/4.3.6
<br />
<b>Warning</b>: mail(): "sendmail_from" not set in php.ini or custom
"From:" header missing in <b>D:\Program Files\Apache
Group\Apache\htdocs\chapter04\ProcessFeedbackz.php</b> on line <b>16</b><br
/>
Failed
..............this above is reprted from Zend Sudio Environment /I have not Zend Studio Server/, but
through http://localhost/chapter04/PHPDocument3.php
my browser /Opera 7.5x/ shows 'Success'. In my Yahoo account is not received any e-mail
indicating in function MAIL(.....)
I don't understand where's the mistake :()~ .....help me