You can manually process Adaptive Server incoming e-mail queries.
sp_processmail reads and responds to unread messages in the Adaptive Server inbox. You can determine which messages to process by passing a value for the originator parameter, the subject parameter or both.
|
When You Specify |
sp_processmail Processes |
|---|---|
|
originator |
Only mail from the specified sender |
|
subject |
Only mail with the specified subject header |
|
originator and subject |
Only mail by the specified sender with the specified subject header |
|
Neither originator nor subject |
Unread mail in the inbox |
sp_processmail uses default parameters when invoking xp_sendmail, but you can override the dbname, dbuser, and separator defaults by passing these values to sp_processmail. For the syntax for sp_processmail and xp_sendmail, see the Reference Manual: Procedures.
sp_processmail @originator = "admin", @dbuser = "sa", @dbname = "db1"
The procedure executes the queries in the db1 database in the System Administrator’s context and returns the results an e-mail attachment to “admin” and to all the copied and blind-copied recipients of the original incoming message.