简体   繁体   中英

Handling Errors that Occur in Fire-And-Forget Emailing


This is more of an opinion based question. I have this situation where I run WCF application on a server that regularly sends a series of emails in a fire-forget style. In otherwords the use hits send on the client side, and then he can shut the client down and go home. Leaving the server side application to Automatically send all the emails off. My question is what would be the best way to handle errors that occur while sending these emails?
The method I have been mulling around implementing is storing all the errors in the database, then the next time the user logs in its checks for errors and returns a list if any.

The question is a little open ended sorry. But I am hoping someone could give me any other ideas on how to handle this.

You're going to have to maintain some sort of logical session for the user, which is more or less what you're proposing to do. If you have a first class delivery failure entity in your database you'll be able to use the database to do analysis later, or you could aggregate session errors into a slab of XML which would be trivial to send to the client app for interpretation. The amorphous blob of XML approach has the advantage that once the system goes into production and IT becomes tiresome about database schema changes you can modify the schema of the XML without consulting them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM