Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Yes...Another SQLMail question.

Author  Topic 

Jed
Starting Member

1 Post

Posted - 2004-12-09 : 14:15:15
I am somewhat new to the SQL Server environment and have stumbled across the SQLMail function. I like it and the possibilies are great. The problem is I am a little stuck getting to where I want to go. I believe I have SQLMail setup correctly as I can send emails via the SQL Query Analizer (example):

------------------------------------------------------------
EXEC xp_sendmail @recipients = 'swilliams@nsdinfo.net',
@query = 'Select FirstName, LastName, LoginID from GSIM2.dbo.tblEmployeeRecord',
@subject = 'SQL Server Report',
@message = 'The contents of INFORMATION_SCHEMA.TABLES:',
@attach_results = 'TRUE', @width = 250
------------------------------------------------------------

I can also use the xp_findnextmsg to see the new messages that pop into the SQL mail box.

I want to create a sp similar to sp_processmail but I want to only process mail with the word backup in the subject and write the contents of the body to a table, delete the original email and send back a received conformation email.

Would anyone have examples for me to look at/build off of? I am a little unsure how to build it.

Thanks in advance for any input.

Jed-
   

- Advertisement -