Debugging Swiftmailer

From Cerberus Helpdesk Wiki

Jump to: navigation, search

Often when we encounter problems with the underlying SwiftMailer plugin we use for SMTP transactions the errors are too vague to be useful, so here's some tips on adding debug logging.

Testing Outgoing SMTP Settings

For problems with your outgoing SMTP Mail Server, edit cerb4/plugins/cerberusweb.core. Near line 2950 you'll find:


Modify that block of code as follows to enable Swift's detailed logging for the SMTP test:


The Swift Logger will automatically append the log output to the Exception when/if thrown, so you just need to initialize it as above. Please note that an elevated log level will have performance implications, and should only be used for debugging purposes.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox