There are many reasons why an SMTP server will refuse to send a message and those errors are caught by PHPMailer and are accessible through the API. However I think the Messaging framework does not report detailed errors. Is it possible to get send failures reported to the drupal log? Not sure if this is a documentation issue or requires coding.

CommentFileSizeAuthor
#1 t.patch2.31 KBm3avrck

Comments

m3avrck’s picture

StatusFileSize
new2.31 KB

here's a proposed patch which adds a debug option to turn this on/off...

m3avrck’s picture

Status: Active » Needs review
jose reyero’s picture

The patch looks good.

However there's a messaging_debug module already which provides a debug option so I don't think we need that one duplicated. But I see the current 'debug' concept (not sending out messages at all) doesn't match this one (extra logging).

So what I think we should do here is extending the debug options in messaging_debug to:
0. None
1. Extended logging
2. Do not send out messages (just log)

With a better wording maybe. Does this make sense?

m3avrck’s picture

Jose, that makes sense for sure.

PHPMailer is slightly screwy in the fact that you have to explicitly set an option in the mailing class to capture debug info and even then mixed results. I'm not super attached to my patch but want to show more as a proof of concept.

I agree a better and *single* debug option would be best. Will mull over some ideas, hmm...

jose reyero’s picture

Status: Needs review » Fixed

Added the option to the module, see the new settings form

Status: Fixed » Closed (fixed)

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