bug fix for mailer configurations, add mailgun support