Added background mailer functionality