Update for working with rails 4, and initial add of mailer capabilities.