(Windows only) Reads, processes, sends, and deletes messages in the SAP ASE message inbox, using the xp_findnextmsg, xp_readmail, xp_sendmail, and xp_deletemail system extended stored procedures (ESPs).
sp_processmail [subject] [, originator [, dbuser [, dbname [, filetype [, separator]]]]]
sp_processmail @subject="SQL REPORT", @originator="janet", @dbuser="sa", @dbname="salesdb", @filetype="res", @separator=";"
sp_processmail @dbuser="sa"
sp_processmail reads, processes, sends, and deletes messages in the SAP ASE message inbox, using the xp_findnextmsg, xp_readmail, xp_sendmail, and xp_deletemail system ESPs.
sp_processmail sends outgoing mail to the originator of the incoming mail message being processed.
sp_processmail uses the default parameters when invoking the ESPs, except for the dbuser, dbname, attachname, and separator parameters to xp_sendmail, which can be overridden by the parameters to sp_processmail.
sp_processmail processes all messages as SAP ASE queries. It reads messages from the SAP ASE inbox and returns query results to the sender of the message and all its cc’d and bcc’d recipients in an attachment to an SAP ASE message. sp_processmail generates a name for the attached file consisting of “syb” followed by five random digits, followed by the extension specified by the filetype parameter; for example, “syb84840.txt.”
sp_processmail deletes messages from the inbox after processing them.
The subject and originator parameters specify which messages should be processed. If neither of these parameters is supplied, sp_processmail processes all the unread messages in the SAP ASE message inbox.
sp_processmail does not process attachments to incoming mail. The query must be in the body of the incoming message.
See also isql in the Utility Guide.
You must have execute permission to run sp_processmail. The permission can be granted to other users by the database owner of sybsystemprocs.
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|