Actually implementing the mailgun logic.