|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30688 imap_mail's rpath don't work
Submitted: 2004-11-04 18:13 UTC Modified: 2013-02-18 00:09 UTC
Avg. Score:3.9 ± 1.2
Reproduced:12 of 14 (85.7%)
Same Version:4 (33.3%)
Same OS:5 (41.7%)
From: sirber at gmail dot com Assigned:
Status: No Feedback Package: IMAP related
PHP Version: 4.3.9 OS: Gentoo Linux 2.6.9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-11-04 18:13 UTC] sirber at gmail dot com
Using imap_mail, and using the rpath setting, the mail I set is not used.


St?phane B?rub?


PHP 4.3.9
* Runs on "apache" user
Exim 4.42
* /usr/sbin/exim -bd -q15m
* Runs on "mail" user
* Special config:
trusted_users = apache

Reproduce code:
$to = "";
$sujet = "test";
$mime = "[headers and mime encoded message]";
$cc = "";
$cci = "";
$from = "";

function imap_send ($to, $sujet, $mime, $cc, $cci, $from)
		imap_mail ($to, $sujet, "", $mime, $cc, $cci, $from);

Expected result:
Return-path: <>

Actual result:
Return-path: <>


patch2 (last revision 2011-08-22 13:18 UTC by ava3ar at gmail dot com)
Patch-by-Keloran-ava3ar-at-gmail-com (last revision 2011-08-04 16:18 UTC by

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-27 18:03 UTC] info at todoo dot com
There is no workaround.
imap_mail simply take the rpath and put it in from-header.
Its impossible for me to get error information back.
 [2004-12-27 22:37 UTC] sirber at gmail dot com
The only "workaround" is to use SMTP with sockets directly.
 [2005-01-19 14:37 UTC]
Use mail() function. It is much more flexible and does exactly same things as imap_mail().

Please ask further support questions on how to configure your system properly on the proper mailing list(s) found at

 [2010-03-20 21:46 UTC] mvanbeek at supporting-role dot co dot uk
If this bug is not going to be fixed, then the parameter should be removed from the function, or the function should become a wrapper for mail().
 [2011-08-04 16:18 UTC]
The following patch has been added/updated:

Patch Name: Patch-by-Keloran-ava3ar-at-gmail-com
Revision:   1312474732
 [2011-08-04 20:44 UTC] ava3ar at gmail dot com
There ya go patched it for you, can be pack ported to 5.3 if needed

thanks to pajoye for putting patch on

this patch has only been tested on amd64, so no idea if it will work on x86 or 
other, but i dont see a reason it wont work on x86
 [2012-07-07 20:03 UTC]
Could you please address the comments on the pull by Johannes?
 [2012-07-07 20:03 UTC]
-Status: Wont fix +Status: Feedback
 [2013-02-18 00:09 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jul 01 16:05:45 2022 UTC