|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22378 "sendmail_from" not set in php.ini or custom "From:" header missing
Submitted: 2003-02-22 15:18 UTC Modified: 2003-03-09 19:01 UTC
Avg. Score:3.7 ± 1.2
Reproduced:53 of 64 (82.8%)
Same Version:19 (35.8%)
Same OS:25 (47.2%)
From: kris at aethiamud dot org Assigned:
Status: No Feedback Package: Mail related
PHP Version: 4.3.0 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kris at aethiamud dot org
New email:
PHP Version: OS:


 [2003-02-22 15:18 UTC] kris at aethiamud dot org
Although I have found a few existing threads with this problem, none seem to address the core issue.  Basically, the "[mail function]" section of my php.ini file is NOT being read at all!  When a forum script I was using gave me an error when it tried to send an email to a newly registered user, I tried every solution I could think of, then every solution I could find at and using google.  I then tried my phpinfo.php page (, which basically just contains the line:


And this is what it listed for the mail function entries:

sendmail_from     no value   no value
sendmail_path     no value   no value 
SMTP              localhost  localhost 

I then checked my php.ini file (which is in my windows directory, properly named), and here is what it says:

[mail function]
; For Win32 only.

; For Win32 only.
sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

The only solution I could find related to the php.ini file somehow not being read at all.  That was my first thought, so I tested that theory by changing the 'register_globals' setting from 'off' to 'on', then I restarted the webserver and reloaded the phpinfo.php page.  Lo and behold, register_globals changed from 'off' to 'on'.  Therefore, the php.ini file IS in the right place, and it IS being read.  However, the [mail function] section does not appear to be.  My email server is configured and functioning properly, and works with the cgi-bin version of sendmail just fine, so that can't be it either.

I'm fresh out of ideas here!  Is this a bug, or just something that I'm not seeing?  Any help you could provide would be very much appreciated  :)



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-22 16:06 UTC]
Two things:
1) does ini_set('SMTP', ''); work?

2) does the cli binary also not display these values? (run: path\to\cli\php -i)
 [2003-02-22 17:34 UTC] kris at aethiamud dot org

1) Could you tell me how to do that ini_set thing?  I tried a few variations with the php/cli/php.exe command line, but couldn't figure out what you meant.

2) I did do the php/cli/php -i and it also displayed the same things; i.e. 'sendmail_from => no value => no value' and 'SMTP => localhost => localhost'
 [2003-02-22 17:39 UTC] kris at aethiamud dot org
Ok I just got what you meant after I hit submit hehe.  I tried adding that line to the phpinfo.php file, and now it lists the local value as and the master value still as localhost.
 [2003-02-22 20:09 UTC]
Ok, then it looks like a parse problem, or you have a syntax error in your php.ini file or the settings are not passed through to the php core.

Try changing a setting _below_ the [mail function] section, like for instance: mysql.default_port to 4306.

Does that value change? Then we can strike the 'passed through' error.
 [2003-02-22 23:29 UTC]
Just a note: I tested this with latest STABLE snapshot on my win2k machine and it works just fine..

 [2003-03-09 19:01 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2008-01-18 07:56 UTC] chaurasia151078 at hotmail dot com
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 06:01:29 2024 UTC