May 22, 2013 at 7:11 am
Don't really understand what is your objective but may be you are looking for
select *
from msdb..sysmail_allitems
May 22, 2013 at 7:23 am
UmaShankar Patel (5/22/2013)
Hi,I have configured SQL Server database mail.
Now i want to read mail of ID that i have configured in SQL Server 2008 r2 database mail.
is it possible?
How?
not directly, and not in TSQL. and it's not a trivial task to be able to add that ability...it requires some coding.
this is easily done in a programming language, so you could add a suite of CLR procedures to do any of the typical steps you would do for reading mail, ie CLR_GetlistOfMessages, CLR_ReadOneMessage,
CLR_GetAttachmentFromOneMessage,
CLR_Deletemessage, etc
best bet is to find one of the many examples for POP3 / IMAP reading in c#.net or vb.net, and
if you are up to the programming portion of it, i may have a prototype i built a while ago i could post.
Lowell
May 22, 2013 at 7:25 am
i should have mentioned to google for a SQL Server CLR+read email, you might have some luck finding something that already exists.
Lowell
May 22, 2013 at 9:53 am
I have done this before using the msdb tables.
you might want to try SELECT * FROM sysmail_sentitems.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply