public static string GetEmail(RestCommand command, int emailID) { Email email = Emails.GetEmail(command.LoginUser, emailID); if (email.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } return(email.GetXml("Email", true)); }