更新时间:2022-10-25 13:51:17
我认为你需要的是一个调度程序而不是线程,请查看:自动发送电子邮件每天在特定时间使用C#和VB.Net中的Windows服务 [ ^ ]
在我看来,使用 Windows任务计划
r是一个更好的选择。
hai
i want send mail to my client at everyday 10.00 pm..
how to finish this task using thread in c# WinForm
What I have tried:
Thread thread = new Thread(new ThreadStart(SendMail));
thread.Start();
I think what you need is a scheduler not thread, check this out: Automatically send emails daily at specific time using Windows Service in C# and VB.Net[^]
In my humble opinion, using the Windows Task Schedule
r is a better option.