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
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_debugoption "Not even for logged errors" with value-1to 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.