Uses new MailgunEmail
that is much more compatible with PHPUnit and DebugKit. You can use MailgunEmail
or the original Email
and add the additional headers which can be found at https://documentation.mailgun.com/en/latest/user_manual.html#sending-via-smtp
The MailgunEmail
class allows you to quickly add the required headers instead of doing it at the Transport
level which caused major issues with PHPUnit and DebugKit.