php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69859 imap_mail does not log
Submitted: 2015-06-17 08:18 UTC Modified: 2020-10-14 13:48 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: petr at jisa dot eu Assigned:
Status: Open Package: IMAP related
PHP Version: 5.6.10 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: petr at jisa dot eu
New email:
PHP Version: OS:

 

 [2015-06-17 08:18 UTC] 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

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-13 16:36 UTC] cmb@php.net
-Package: Mail related +Package: IMAP related
 [2020-10-14 13:48 UTC] cmb@php.net
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().
 [2021-10-04 07:52 UTC] maghsodid at yahoo dot com
The following pull request has been associated:

Patch Name: Update HTTP URLs to HTTPS where appropriate
On GitHub:  https://github.com/php/doc-base/pull/42
Patch:      https://github.com/php/doc-base/pull/42.patch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC