Mailer class added, though I couldn't get Imap socket to stay open between different requests.