0

SQL Server has dbmail for sending mails but how to get emails easily inside database?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Kodak
  • 1,779
  • 2
  • 18
  • 29
  • 1
    Are talking about doing this 1) from a program, e.g. a C# app or something like that, or do you mean 2) to do this from your Exchange server using some tools etc.?? – marc_s Sep 20 '11 at 12:12
  • At best directly from SQL server. Currently there is outlook running on client PC with onreceive macro but it is not reliable. – Kodak Sep 20 '11 at 12:44
  • I am looking into CLR procedures... – Kodak Sep 20 '11 at 12:57
  • http://stackoverflow.com/questions/1973053/c-exchange-email-client here is good tip - put all emails to folder using admin rule - sql job could then pick it up from there to process but is there an API to get email as object... – Kodak Sep 20 '11 at 13:05

1 Answers1

1

If you are talking about Exchange 2007/2010, you should look into SyncFolderItems:

http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.syncfolderitems(v=exchg.80).aspx

EWS Managed API - Download: http://www.microsoft.com/download/en/details.aspx?id=13480

EWS Managed API - SDK: http://msdn.microsoft.com/en-us/library/dd633710(v=exchg.80).aspx

Henning Krause
  • 5,302
  • 3
  • 24
  • 37