move mailer to lib, add gmail config