Mailgun fix

Don't merge this request, because there is no unit-tests for new functionality
Thanks