initialize function for mailer class.