#40988 [Opn->Asn]: Can't use a sendmail_path with whitespace
| From: | tony2001@php.net | Date: | Thu, 05 Apr 2007 19:59:54 +0000 |
| Subject: | #40988 [Opn->Asn]: Can't use a sendmail_path with whitespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111162@lists.php.net to get a copy of this message | ||
ID: 40988
Updated by: tony2001@php.net
Reported By: webmaster at wiedmann-online dot de
-Status: Open
+Status: Assigned
Bug Type: *Mail Related
Operating System: Windows_NT
PHP Version: 5.2.1
-Assigned To:
+Assigned To: edink
Previous Comments:
------------------------------------------------------------------------
[2007-04-05 12:17:28] webmaster at wiedmann-online dot de
> PHP on windows does not use sendmail for sending mails.
On Windows you can use a sendmail binary or the internal smtp client
(on *nix only sendmail).
(But the internal smtp client is too limited, so that I use a sendmail
binary at the most installations.)
> Is this cygwin build?
No. Standard Windows builds.
------------------------------------------------------------------------
[2007-04-05 11:22:23] edink@php.net
PHP on windows does not use sendmail for sending mails. Is this cygwin
build?
------------------------------------------------------------------------
[2007-04-04 01:11:33] webmaster at wiedmann-online dot de
Description:
------------
If I have the sendmail binary in a path with a whitespace, PHP can't
open/find this program, because the path is not quotet in the popen call
(mail.c).
On *nix this is not a problem, because on *nix you escape a space with
a backslash (Program\ Files) and don't quote the hole path ("Program
Files") like on Windows. And a backslash I can add myself in php.ini.
BTW:
A 8.3 name (PROGRA~1) will still work on Windows, if it's not disabled
in the NTFS settings.
Reproduce code:
---------------
[php.ini]
sendmail_path = "C:\Pogram Files\sendmail\sendmail.exe -t"
<?php mail('test@example.com', 'Subject', 'Message'); ?>
Expected result:
----------------
Mail is send without problems.
Actual result:
--------------
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40988&edit=1