Added missing dependency.
Added documentation about API testing.
Refactored mailer and added tests.