#26480 [Opn]: mail function does not recognise php.ini settings
| From: | kevin dot davies at iinet dot net dot au | Date: | Mon, 01 Dec 2003 06:12:07 +0000 |
| Subject: | #26480 [Opn]: mail function does not recognise php.ini settings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51414@lists.php.net to get a copy of this message | ||
ID: 26480
User updated by: kevin dot davies at iinet dot net dot au
Reported By: kevin dot davies at iinet dot net dot au
Status: Open
Bug Type: Mail related
Operating System: Windows 2000
PHP Version: 4.3.4
New Comment:
The discussion thread
http://www.nukescripts.net/modules.php?name=Forums&file=viewtopic&p=3627#3627
describes how this bug was found. You can refer to it for more details
of this bug.
Previous Comments:
------------------------------------------------------------------------
[2003-12-01 01:07:02] kevin dot davies at iinet dot net dot au
Description:
------------
If you try to use mail() under Windows 2000/IIS5 you get a warning. If
you add the following lines to the top of your php file the warning
goes away.
ini_set("sendmail_from", "username@your.host.com");
ini_set("SMTP", "192.168.1.1");
It appears that mail() is not reading php.ini settings. The ini file
was correct and duplicated in c:\winnt\php.ini and c:\php\php.ini and
it made no difference.
Reproduce code:
---------------
<?php
mail("peter@nowhere.com","Hello","Blah Blah");
?>
Expected result:
----------------
It should work without errors.
Actual result:
--------------
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:"
header missing in \modules\Your_Account\index.php on line 680
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26480&edit=1