process querries via my mail | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

process querries via my mail

I have configured SQL mail and outlook.Now i need to process querries via my mail na d recive the output by mail.How can I do this.??
Have you read about xp_sendmail extended procedure in BOL? — Rediscover the web

Hi ! ys I read the documentation of xp_sendmail.It has a parameter @query whch can take the query whch can send the result by email.But I want to send the queries by email to the SQL server with out using QA,and want the results by mail.How can I do this?
Now I understand what you mean. I have never used it myself, but here’s what I’ve found: From BOL:

sp_processmail Uses extended stored procedures (xp_findnextmsg, xp_readmail, and xp_deletemail) to process incoming mail messages (expected to be only a single query) from the inbox for Microsoft® SQL Server™. It uses the xp_sendmail extended stored procedure to return the result set to the message sender. Incoming e-mail is expected to have a single valid SQL Server query as the message text. The results of the query are returned to the message sender and copied to any e-mail users on the CC: list of the original message.
Rediscover the web

And also article about indepth of SQL Mail usage. HTH Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.