Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Installed PHPMailer on a production site yesterday. Everything worked fine. Woke up today, logs full of errors, users complaining.
However, I've absolutely no clue what the cause of the error messages is:
Type phpmailer
Date Thursday, June 9, 2011 - 15:05
User Anonymous
Location http://example.com/user/register
Referrer http://example.com/user/register
Message SMTP error: data not accepted
Severity error
We need to add more verbose output to the error message.
Debugging and resolving the actual "data not accepted" error is a separate issue.
Also related: #1183820: Allow sending test mail without globally enabling PHPMailer
Comment | File | Size | Author |
---|---|---|---|
#7 | phpmailer.errors.7.patch | 6.49 KB | sun |
#5 | phpmailer.errors.5.patch | 6.13 KB | sun |
#4 | phpmailer.errors.4.patch | 5.78 KB | sun |
#2 | phpmailer.errors.2.patch | 4.69 KB | sun |
#1 | phpmailer.errors.1.patch | 4.59 KB | sun |
Comments
Comment #1
sunAFAICS, this is the only way to resolve this. Quite messy, but PHPMailer (resp. the SMTP class) doesn't support any other error handling.
Comment #2
sunRestoring existing debug output behavior.
Comment #3
sunI'm not sure about the performance impact of the output buffering.
If we'd want to retain the current behavior for any reason, then we could add a new
smtp_debug
option "Not even for logged errors" with value-1
to the existing Debug level configuration setting.Thoughts?
Comment #4
sunUnfortunately, logging mails has security implications.
Briefly discussed in IRC, and the limited clean-up as in attached patch is all we are able to do.
Comment #5
sunI've to say, this works perfectly. Finally I'm able to see server reponses and the message that was attempted to be sent.
Minor tweaks to the log message formatting in attached patch.
Comment #6
sunCommitted to 6.x-3.x, needs forward-porting to 7.x-3.x.
Comment #7
sunCommitted attached patch to 7.x-3.x.