如何在asp.net中自动发送电子邮件通知 [英] how to send email notification in asp.net automatically

查看:110
本文介绍了如何在asp.net中自动发送电子邮件通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张桌子

1)Tbl_EmailAddress

id,

emailId



2)Tbl_Product

pid,

pname,

pdetail,

startDateTime,

CloseDateTime,



现在

数据库表中有一些数据



i希望在startDateTime成为服务器时间时邮寄我的所有用户(om email id)



然后我该怎样才能完成...



邮件应该在StartDateTime上发送(邮件包含产品名称和详细信息)



请帮助

谢谢

i have two table
1) Tbl_EmailAddress
id,
emailId

2) Tbl_Product
pid,
pname,
pdetail,
startDateTime,
CloseDateTime,

now
there are some data in database tables

i want to mail my all users (om email id) when startDateTime becomes Server time

then how can i accomplish ...

mail should be send on StartDateTime (mail contain product name and details)

please help
thanks

推荐答案

写一个将在午夜12点之后运行电子邮件发送功能的Windows服务



发送自动电子邮件提醒的简单Windows服务 [< a href =http://www.codeprojec t.com/Articles/16335/Simple-Windows-Service-which-sends-auto-Email-alertarget =_ blanktitle =新窗口> ^ ]
Write a windows service that will run the email sending functionality after 12 o clock midnight

Simple Windows Service which sends auto Email alerts[^]


我认为你可以创建一个简单的C#应用​​程序来读取数据库并发送电子邮件,并使用Windows计划任务安排应用程序。这是我看到的最简单的方法。
I think you can create a simple C# application to read from the database and send the emails, and schedule the application using a Windows scheduled task. This is the easiest way I see.


你可以在windows应用程序的帮助下完成这个,假设你的数据库开始时间是11点钟。在此应用程序中创建一个Window应用程序添加计时器。这个计时器是第二次检查我们的开始时间,如果开始时间是11点,则每个人发送其他明智的虚假条件。
you can do this with the help of windows application, suppose your Database start time is 11:00 o'clock. Make a Window application in this application add a timer. This timer is second check our start time, if start time is 11:00 o'clock send the every person email other wise false condition.


这篇关于如何在asp.net中自动发送电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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