first part of mailer setup