Move email generation to mailin view - fix according tests
Be sure to recover the old securitymanager (wrap try/finally)
Resolve destination with the new security manager