To prevent unauthorized users from accessing privileged Adaptive Server data through e-mail, you must set:
The execution privileges on the ESPs that process mail
The security context for executing queries
Use the xp_sendmail or sp_processmail procedures to set these values.