|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40074 unable to set sendmail_path using php via shell
Submitted: 2007-01-09 11:28 UTC Modified: 2007-01-09 11:40 UTC
From: trani at softwareplanet dot net Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.4.4 OS: Linux cent os
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: trani at softwareplanet dot net
New email:
PHP Version: OS:


 [2007-01-09 11:28 UTC] trani at softwareplanet dot net
It seems that using php from command line (not calling it via web and then passing via apache and htaccess) the ini_set directive with sendmail_path doesn't work: ini_set is ignored

Reproduce code:
echo "<? ini_set('sendmail_path', '/usr/sbin/sendmail -t -i -f'); mail ('','test','test'); ?>" | php 

Expected result:
the email received should have the return_path set to

Actual result:
the email received has the default return_path (username@severname).

Where can I set this value (sendmail_path) when I execute a script directly from the command line?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-09 11:39 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

sendmail_path cant be changed with ini_set().
Use php -dsendmail_path="...."
 [2007-01-09 11:40 UTC]

sendmail_path	- PHP_INI_SYSTEM
Where "PHP_INI_SYSTEM" means "Entry can be set in php.ini or httpd.conf".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 11 16:01:28 2023 UTC