note 44884 added to function.mail

From: Date: Thu, 19 Aug 2004 06:12:58 +0000
Subject: note 44884 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-74926@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44884 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44884&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44884&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74926) next »