|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24484 SMTP variable in php.ini useless
Submitted: 2003-07-03 09:46 UTC Modified: 2003-07-03 13:32 UTC
From: anelson at mlis dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.1 OS: Redhat 7.2/3
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: anelson at mlis dot com
New email:
PHP Version: OS:


 [2003-07-03 09:46 UTC] anelson at mlis dot com
By adding the line:


where xxx is more of the address, the mail() function still uses localhost.  I've seen some stuff about these variables working only on windows.  Is this true.  Otherwise, there is no error message or anything.  Seems like the variable just does nothing.

Reproduce code:


Expected result:
I expected to have the mail try to go out through the SMTP server specified

Actual result:
The mail went out from localhost


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-03 09:48 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

It\'s windows only...
 [2003-07-03 09:53 UTC] anelson at mlis dot com
Ok, I just wanted it documented, since there is no information anywhere else.  In the end, modifying the sendmail configuration is the better method.  I did try this on multiple machines pointing to multiple SMTP servers to no avail.

Also, there is no fix in the changelog to 4.3.2
 [2003-07-03 13:22 UTC]
From php.ini-dist:

[mail function]
; For Win32 only.
SMTP = localhost


    Used under Windows only: DNS name or IP address of the SMTP server PHP should use for mail sent with the mail() function. 

I'm curious where you even found the SMTP ini option since both of these places have documented their Win32-only nature for some time.
 [2003-07-03 13:32 UTC] anelson at mlis dot com
Maybe on this page there should be a column for OS.  Also in "Programming PHP" from O'Reilly, there isn't any reference to it being Windows only.  It was clear that sendmail_from was Windows, but not SMTP itself.

Thanks for being on top of things.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 11:05:53 2022 UTC