add better support for both Nodemailer and Mailgun API