php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42164 Internal Sendmail Support is ALWAYS disabled
Submitted: 2007-08-01 10:57 UTC Modified: 2007-08-02 02:21 UTC
From: Brian dot White at foxfire74 dot com Assigned: johannes (profile)
Status: Closed Package: Mail related
PHP Version: 5CVS-2007-08-01 (snap) OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Brian dot White at foxfire74 dot com
New email:
PHP Version: OS:

 

 [2007-08-01 10:57 UTC] Brian dot White at foxfire74 dot com
Description:
------------
In the latest snapshot, /main/main.c (line 234) defines a sendmail_path of "/usr/sbin/sendmail -t -i" even if compiling for Windows.  As a result, Internal Sendmail Support for Windows is ALWAYS disabled since /ext/standard/mail.c (line 204) uses this variable to determine whether to use the internal SMTP server or an external sendmail program.  Since a non-null default value exists, and is not possible to set sendmail_path to NULL (as opposed to the empty string) via php.ini mail always tries to use sendmail which results in a "The system cannot find the path specified." error.  Main.c needs to check PHP_WIN32 and set the default sendmail_path to NULL when building for Windows.

Reproduce code:
---------------
<?php
	mail('me@mydomain.com', 'Test', 'Test Message');
?>

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

; For Win32 only.
sendmail_from = Admin@mydomain.com

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

Expected result:
----------------
Mail should be sent.

Actual result:
--------------
The system cannot find the path specified.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-01 12:31 UTC] johannes@php.net
I'll fix that in a second. Thanks for the hint
 [2007-08-02 02:21 UTC] Brian dot White at foxfire74 dot com
This seemed to fix the problem.  Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Mar 15 01:01:29 2025 UTC