|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34565 mb_send_mail does not fetch mail.force_extra_parameters
Submitted: 2005-09-20 16:11 UTC Modified: 2005-09-21 15:23 UTC
From: Bjorn dot Wiberg at its dot uu dot se Assigned:
Status: Closed Package: mbstring related
PHP Version: 5.1.0RC1 OS: AIX 5.2.0 ML5
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: Bjorn dot Wiberg at its dot uu dot se
New email:
PHP Version: OS:


 [2005-09-20 16:11 UTC] Bjorn dot Wiberg at its dot uu dot se
Note: This also happens with PHP 5.0.5.

mb_send_mail() does not fetch and/or use the mail.force_extra_parameters from httpd.conf, despite the documentation stating that it is a wrapper around mail() (which does fetch and use those extra parameters):

/../ "mb_send_mail() is wrapper function of mail(). See mail() for details." /../

Reproduce code:
  $from = '';
  $to = '';
  $subject = 'Hi!';
  $body = 'Hi,\n\nHow are you?';
  $status = mb_send_mail($to, $subject, $body);

Corresponding httpd.conf entry:

  php_admin_value mail.force_extra_parameters "-t -f"

Expected result:
That the mail.force_extra_parameters are automatically used.

Actual result:
The mail.force_extra_parameters are not used. This may cause problems with the sendmail program if it expects those parameters.

One has to fetch the parameters with ini_get('mail.force_extra_parameters') and feed it to mb_send_mail() like this:

  $status = mb_send_mail($to, $subject, $body, '', ini_get('mail.force_extra_parameters'));


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 15:23 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 08:01:27 2024 UTC