一次性发送所有例外电子邮件 [英] Send all the exception emails at one go
问题描述
大家好,
我会解释我的问题.
我的应用程序每隔一分钟发送一次错误的电子邮件.它有一个Web服务.因此,每当Web服务关闭时,我的应用程序就会每隔1分钟发送一次检查它的电子邮件.一个小时后,它将向我发送60封电子邮件.
我想只每10分钟发送一次电子邮件.
但是它有一个逻辑上的弊端,因为我随时可能会失去在此期间发生的任何其他异常.
我想到了使用字符串生成器并附加所有异常,然后在10分钟内将其作为单个电子邮件发送.
但是我想我会通过与您讨论来寻找更好的选择.
因此,如果有任何更好的方法可以与我分享这个想法.
我很感激.
在此先感谢
Jiju A Nair
Hi all,
I will explain my issue.
My application sends the error emails every one minute.It has got a web service.So whenever the web service is down my application will send the emails as it checks every 1 minute.This is getting hectic on me as if the web service is down for an hour it will send me 60 emails.
I thought of sending the emails in every 10 minute only.
But there is a logical downside to it as i stand to lose any other exceptions happening in the in between time.
I thought of using a string builder and appending all the exceptions and sending it as a single email in 10 minutes.
But i thought i will look for better options by discussing with you.
So if any of guys have a better way of doing it share the idea with me.
I appreciate it.
Thanks in Advance
Jiju A Nair
推荐答案
为什么不将异常发送到数据库,并创建一个自用户以来就记录了新异常的网页的最后一次访问.
当记录了一定数量的异常时,您还可以发送通知消息,并给用户提供以一定的时间间隔或以一定的计数级别接收通知的机会.重要的是让他选择接收通知的方式/时间.
Why don''t you just send the exceptions to a database, and create a web page that incidcates new exceptions have been logged since the user''s last visit.
You could also send a notification message when a certain number of exceptions have been logged, and give the user the iopportunity to receive notifications either at certain time intervals, or at a certain count level. The important part is to let him choose how/when to receive the notifications.
这听起来像是一个不错的计划,但是无论如何我都可以从Windows应用程序本身中获得它,而不用去到Web部件.
Thats sounds like a nice plan,but is there anyway i can so it from the windows app itself instead of going to the web part.
这篇关于一次性发送所有例外电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!