Bug #69859 [Opn]: imap_mail does not log
| From: | cmb@php.net | Date: | Wed, 14 Oct 2020 13:48:30 +0000 |
| Subject: | Bug #69859 [Opn]: imap_mail does not log | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229617@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69859&edit=1
ID: 69859
Updated by: cmb@php.net
Reported by: petr at jisa dot eu
Summary: imap_mail does not log
Status: Open
Type: Bug
Package: IMAP related
PHP Version: 5.6.10
Block user comment: N
Private report: N
New Comment:
Fascinating! Apparently, imap_mail() makes not much sense if the
mail is going to be sent via sendmail_path; it's just a stripped
down alternative implementation to mail() (does not log, does not
protect from header injection, etc.) Only if the mail is going to
be sent directly via SMTP it may (still) make sense to use this
function, because it properly parses the address lists, although
the mail() implementation also attempts this at least.
It might make sense to implement imap_mail() on top of php_mail().
Previous Comments:
------------------------------------------------------------------------
[2015-06-17 08:18:28] petr at jisa dot eu
Description:
------------
common mail() fce has logging support configurable by php.ini. It can log to file or syslog.
but imap_mail() doesn't provide any logging. Just silently send the email.
Test script:
---------------
imap_mail("dude@example.com","Test","Test mail");
Expected result:
----------------
imap_mail() should respect INI settings
mail.log
mail.add_x_header
Actual result:
--------------
imap_mail()
- doesn't log (mail.log)
- doesn't include uid/script to mail header (mail.add_x_header)
Affected all latest PHP 5.x versions
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69859&edit=1