camsys/oneclick — pull request #6 by abmagil (2014-05-18 20:49:58+00:00)
Title: Initial commit.  Returns email functionality that was removed.

As part of the process of bringing the user controllers (admin vs base) inline, email functionality was taken out/never added and hasn't been working. This PR is to add it back, specifically when adding an agency or a delegate to a user. Functional testing seems solid, but no new rspec tests.

Issues
1. Emails are sent only on creation of relationships, rather than update or confirmation. This is just because that's the *simplest*, rather than *best* way of doing this.
2. Agency-based emails come from either the agency's public email address or, if that is not set, their name. Since we don't validate that agencies must have a public contact email, we can't just use that. Users must have an email address, so that will always be used in emails.
3. During testing, it appeared that buddy emails were going to the traveler, rather than the delegate. Unsure whether that's just the header saying the wrong thing or if the emails are actually going to the wrong place.