Mailer seems to work, removed most test code.  There's still code in here to fix the reg email content though