我如何...在asp.net中自动发送电子邮件 [英] How do I...send emails automatically in asp.net

查看:96
本文介绍了我如何...在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

推荐答案

您可以使用ASP.NET执行此操作,但您可以通过编写简单的控制台应用程序来执行此任务,以便在执行时从数据库中获取数据来发送电子邮件。将此exe安排为Windows计划任务,并在每5分钟或根据需要运行它。

其他选项请查看这些答案 [< a href =http://stackoverflow.com/questions/542804/best-way-to-run-scheduled-taskstarget =_ blanktitle =New Window> ^ ]
you can do this using ASP.NET but you can simply do this task by writing simple console application to send emails by fetching data from database at the excution time. Schedule this exe as windows scheduled task and run it in every 5 minutes or as you need.
for other options check These answers[^]


阅读我过去的答案 - 如何从Asp.net C#发送自动消息? [ ^ ]。
Read my past answer - How to send Automatic Messages from Asp.net C#?[^].


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

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