|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-15 09:58 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 00:00:01 2025 UTC |
Description: ------------ The function imap_mail() does not use imap on Unix systems. Instead, it searches for the local sendmail executable, ignoring any connection made by imap_open(). That way, it is impossible to send email e.g. - from an LAMP-only server without a local sendmail/exim/postfix - using alternative usernames/mailservers thus making the IMAP functionality quite senseless. Extraction of source code responsible for the bug: ext/imap/imap_mail.c, function _php_imap_mail, lines 3497-3522 #ifdef PHP_WIN32 [..] #else if (!INI_STR("sendmail_path")) { return 0; } sendmail = popen(INI_STR("sendmail_path"), "w"); if (sendmail) { [..] #endif Another bug here is that rpath variables is re-written as "From:", ignoring the additional_header variable that may contain "From: xyz..." also. Reproduce code: --------------- <?php // send email via imap imap_open($mailbox, $username, $password); imap_mail($target, $subject, $body); imap_close(); ?> Expected result: ---------------- Get an email from $username. Actual result: -------------- Get an email from the local (Apache) account running PHP.