php.net |  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
 [2003-07-03 09:46 UTC] anelson at mlis dot com
Description:
------------
By adding the line:

SMTP = 64.90.xxx.xxx

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:
---------------
</usr/local/lib/php.ini>

SMTP = 64.90.xxx.xxx



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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-03 09:48 UTC] derick@php.net
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 http://www.php.net/support.php 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] pollita@php.net
From php.ini-dist:

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

From: http://www.php.net/manual/en/ref.mail.php

SMTP 
    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.

http://us2.php.net/manual/en/function.ini-set.php

Thanks for being on top of things.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 03:05:52 2022 UTC