Refactor how to setup mailer.

Signed-off-by: crynobone <crynobone@gmail.com>