added missing error reporting in mail controllers