note 44884 deleted from function.mail by sniper
| From: | sniper@php.net | Date: | Wed, 19 Jan 2005 14:35:51 +0000 |
| Subject: | note 44884 deleted from function.mail by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83629@lists.php.net to get a copy of this message | ||
Note Submitter: dv at josheli dot com
----
more win32 warnings/oddities/etcetera:
if you're NOT using a local sendmail ("sendmail_path" is empty) and your
"sendmail_from" is empty in your php.ini file, you will get an error, even if you set a
"From:" header.
<?php
mail('user@example.com','subject','body',"From:
me@domain.com\r\n");
/*
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header
missing in C:\php\test.php on line 3
*/
?>
in the following code, assume the "user@example.com" mailbox does not exist:
<?php
$r = mail('user@example.com','subject','body',"From:
me@domain.com\r\n");
var_dump($r);
/*
Windows output:
Warning: mail(): SMTP server response: 550 No such recipient in C:\php\test.php on line 3
bool(false)
Non-Windows output:
bool(true)
*/
?>
good times.