php.net |  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
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: trani at softwareplanet dot net
New email:
PHP Version: OS:

 

 [2007-01-09 11:28 UTC] trani at softwareplanet dot net
Description:
------------
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 autoreply@mydomain.it'); mail ('test@mydomain.com','test','test'); ?>" | php 

Expected result:
----------------
the email received should have the return_path set to autoreply@mydomain.it

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?

Patches

Pull Requests

History

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

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

sendmail_path	- PHP_INI_SYSTEM
Where "PHP_INI_SYSTEM" means "Entry can be set in php.ini or httpd.conf".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC