php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5662 Bug in mail function with SMTP
Submitted: 2000-07-18 11:59 UTC Modified: 2000-08-19 12:10 UTC
From: patrault at discofone dot fr Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Release Candidate 2 OS: WINNT 4.0
Private report: No CVE-ID: None
 [2000-07-18 11:59 UTC] patrault at discofone dot fr
Hello,

i have a trouble wih php, on the win32 version of PHP, the mail function produce an error when SMTP server is not on  TCP port 25. Here it is set in services file as TCP port 17 and TCP port 25 is a Norton Antivirus Gateway. The prob is i have a script :
mail($receiver,'Demande d intervention',$di,'From:assistante@discofone.fr');

very simple, when SMTP is standard port (ie here 25) all is working perfectly but when u change it to another port, it is not working anymore:
Warning: Failed to Connect in d:\intranet\di\gomail.php3 on line 10

In php.ini, the SMTP server is set to localhost (tried localhost:17) as gateway, web server, and mail server are on the same computer.

I think its bug.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-26 22:29 UTC] zak@php.net
Can anyone shed some light on this problem?  Is there a defined method for specifying the port in the SMTP directive?

Should he be trying something like 127.0.0.1:25 or 127.0.0.1 25?
 [2000-07-27 08:24 UTC] joey@php.net
The problem is that the port number is hard coded in
win32/sendmail.c...

I am posting a suggestion for a patch to the dev mailing
list in the next hour or so that will hopefully lead to
a solution.
 [2000-08-19 12:10 UTC] joey@php.net
Fixed in CVS. Use new ini param sendmail_port.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 09:01:31 2024 UTC