Hw 2从C#编码触发邮件 [英] Hw 2 trigger a Mail from C# Coding

查看:72
本文介绍了Hw 2从C#编码触发邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Framework 2.0.
我需要在每个星期一自动触发2条针对细小虫的邮件.

Hi, I m using Framework 2.0.
I need 2 trigger a mail for perticuler thing on every monday automatically

推荐答案

好吧,您需要创建一个Thread(或BackgroundWorker)对象,该对象位于在寻找适当的日期/时间时旋转,然后您需要Google搜索或搜索Codeproject以获取有关如何从应用程序发送电子邮件的示例.做到这两项都很简单,并且在网络上有成千上万个如何做到这两个例子.

就我个人而言,我将使用BackgroundWorker,因为它很容易取消,并且您可以轻松地更新UI(如果需要或期望),以反映出发送下一封邮件之前的剩余时间.

我写了一篇有关日程安排的文章(在这里给出了定期安排的日期/时间:

安排将来的日期 [
Well, you need to create a Thread (or BackgroundWorker) object that sits and spins while watching for the appropriate date/time, and then you need to google to or search Codeproject for examples of how to send an email from your application. Doing both of those things is fairly trivial, and there are thousands of examples of how to do both on the net.

Personally, I would use a BackgroundWorker because it''s easily canceled, and you can easily update the UI (if necessary or desired) to reflect the time remaining before the next mail is sent.

I wrote an article about scheduling (coming up with a regularly scheduled date/time here:

Scheduling Future Dates [^]


没有更多的信息,很难建议.

您可以编写一个简单的电子邮件程序并将其设置为在Windows Scheduler下运行.
Without a bit more info, difficult to advise.

You could write a simple email program and set it to run under windows scheduler.


这篇关于Hw 2从C#编码触发邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆