MailgunGateway refactor