Along with this and Kong there is also https://github.com/mailhog/MailHog for testing SMTP failure scenarios on outgoing email.
It just outputs the mail it receives to stdout as JSON for easy parsing. Sending to specific email addresses "e.g. 451-please-try-again-later@smtperrors.com" will trigger specific SMTP errors.