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

sun’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new4.59 KB

AFAICS, this is the only way to resolve this. Quite messy, but PHPMailer (resp. the SMTP class) doesn't support any other error handling.

sun’s picture

StatusFileSize
new4.69 KB

Restoring existing debug output behavior.

sun’s picture

I'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?

sun’s picture

StatusFileSize
new5.78 KB

Unfortunately, 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.

sun’s picture

StatusFileSize
new6.13 KB

I'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.

sun’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Category: task » bug
Status: Needs review » Patch (to be ported)

Committed to 6.x-3.x, needs forward-porting to 7.x-3.x.

sun’s picture

Status: Patch (to be ported) » Fixed
StatusFileSize
new6.49 KB

Committed attached patch to 7.x-3.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.