Exchange 2007 API for reading log files that contain bounced emails?
Ive been trying to figure out how this situation is handled easily.开发者_StackOverflow社区
I have a website that sends out some emails. I want to be able to somehow get the bounce backs and so I can store the information in a DB table.
The main confusion comes in how is this done? I assume I create a email address that will be the FROM:. But when the email doesnt go through I assume Exchange Server would get that bounce back... does it log it somewhere? in a file? In a database? How can I read this info ?
I have built a couple of applications that process Exchange bounce backs. Generally the bounce back messages will get returned to the inbox of the FROM address on the message that you send out. So, in order to store that information in a database table, I built a windows service that would periodically read that bounce back inbox, and then log that information into a database.
I assume your using exchange; So, in order to read the bounce back information from exchange I used the Exchange Web Services, that allow you to connect to exchange and read the message contents within an inbox (in addition to a bunch of other exchange functions). From there I could process the messages and insert data into my application's database.
One thing to note, is that Exchange Web Services are only available for Exchange 2007 or later. If you're using an earlier version, then you would have to investigate other options.
精彩评论