如何标记来自SMTP服务器的重置附件 [英] How to mark reset attachments from SMTP server
问题描述
我如何标记和重置SMTP服务器中的附件文件输入,以供日后重用?欢迎提出任何建议.
How can I mark and reset the inpustream of attachments file from SMTP server for multiple reuse later?Any suggestions will be welcome.
推荐答案
您现在不愿意创建服务,我认为您对所描述的场景感到困惑.尽管您可以采取一些措施来避免仍然有待处理消息的情况下没有用户启动客户端的问题.
you are not willing to create the service now, I think you are stuck with the scenario you describe. There are some things though you could do to circumvent the problem of no user firing up the client anymore while there are still pending messages.
您可以添加一个命令行实用程序,该实用程序将仅检查未决消息并尝试发送它们.
You could add a commandline utility that will only check for pending messages and try to send them.
将此命令行实用程序添加到StartUp文件夹或注册表中的Run键.这样,即使用户没有启动您的应用程序,消息也至少会在计算机重新启动时发送.
Add this commandline utility to the StartUp folder or Run key in the registry. This way messages will at least get sent when the computer restarts, even if the user does not fire up the your app.
添加计划任务以每天至少运行一次此实用程序.计划的任务可以通过代码或安装程序添加.
Add a scheduled task to run this utility at least once every day. The scheduled task can be added by code or by your installer.
如果同时执行这两项操作,则只需要担心永远不会重新启动计算机的用户的待处理消息即可.
If you do both, you will only have to worry about pending messages of users that never start their computer again.
这篇关于如何标记来自SMTP服务器的重置附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!