clean up mailer code, keep smtp variables out of source