|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66829 mail function failure
Submitted: 2014-03-05 21:38 UTC Modified: 2014-12-30 10:42 UTC
From: jim at hwy61 dot com Assigned:
Status: No Feedback Package: Mail related
PHP Version: 5.5Git-2014-03-05 (Git) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jim at hwy61 dot com
New email:
PHP Version: OS:


 [2014-03-05 21:38 UTC] jim at hwy61 dot com
A truly bizarre problem. Using the PHP mail function, if the message, or any attachment file, contains the absolute string "" the function fails completely. The email will not be delivered. Removing or changing any character in the string will permit the mail to be sent. 

Test script:
mail($toaddress, $subject, $message);

Expected result:
The email will not be delivered, unless at least one character in the message is deleted or changed.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-05 22:10 UTC]
-Status: Open +Status: Feedback
 [2014-03-05 22:10 UTC]
This is so very likely a spam filter or other anti-spam mechanism taking effect. Look into that.
 [2014-03-05 22:50 UTC] jim at hwy61 dot com
-Status: Feedback +Status: Open
 [2014-03-05 22:50 UTC] jim at hwy61 dot com
Not a spam filter issue. Fails regardless of recipient address, and the recipient address I'm using to receive has no spam filtering at all.
 [2014-03-05 22:59 UTC]
-Status: Open +Status: Feedback
 [2014-03-05 22:59 UTC]
And it's not your sendmail client? Because I can guarantee you that PHP doesn't have any kind of "if email message contains string '' then don't send" logic.
If mail() returned true then it was handed off to sendmail, in which case it should have some log indicating what happened with the message (eg, not sent, rejected by remote server, sent successfully).
 [2014-12-30 10:42 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 "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 10:01:29 2024 UTC