From:             Bjorn dot Wiberg at its dot uu dot se
Operating system: AIX 5.2.0 ML5
PHP version:      5.1.0RC1
PHP Bug Type:     mbstring related
Bug description:  mb_send_mail does not fetch mail.force_extra_parameters

Description:
------------
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:
---------------
<?php
  $from = '[EMAIL PROTECTED]';
  $to = '[EMAIL PROTECTED]';
  $subject = 'Hi!';
  $body = 'Hi,\n\nHow are you?';
  mb_language("uni");
  $status = mb_send_mail($to, $subject, $body);
?>

Corresponding httpd.conf entry:

  php_admin_value mail.force_extra_parameters "-t -f
[EMAIL PROTECTED]"


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'));

-- 
Edit bug report at http://bugs.php.net/?id=34565&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34565&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34565&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34565&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34565&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34565&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34565&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34565&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34565&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34565&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34565&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34565&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34565&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34565&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34565&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34565&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34565&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34565&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34565&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34565&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34565&r=mysqlcfg

Reply via email to