Refactored a-mailer.js to better support multiple mailer objects with
different host configurations in a single application when used as a
CommonJS module.