|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-01 01:12 UTC] kevin dot davies at iinet dot net dot au
[2003-12-01 01:21 UTC] kevin dot davies at iinet dot net dot au
[2003-12-01 03:53 UTC] magnus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
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