在系统中向用户发送自动电子邮件 [英] Sending automated emails to user in sysstem

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

问题描述

亲爱的所有人:

我有一个包含用户和admin的管理系统.这是一个图书馆系统,在这里我要实现的是将提醒作为自动邮件发送给用户,以防万一他们在提交日的1天之前从图书馆借了书.例如,如果提交日期是8月10日,则提醒必须提前1天,即8月9日.


在这里,我的要求是使用"Outlook"发送邮件.
系统应首先在上午9点运行,并检查问题详细信息,并且系统中是否有某个用户的提交日期正在接近该用户,应从系统发送一封自动电子邮件.


我不了解批处理和计划程序,因此我不知道我该如何实际完成此工作,将不胜感激.

Dear All:

I have a management system with users and admin.It is a library system What i want to achieve here is to send reminder as automated mail to user in case if they have borrowed book from library before 1 day of submission day. for an example if the submission day is 10th of august the reminder must come 1 day beforehand that is on 9th of august.


Here my requirement is to send mails using "Outlook".
The system should run @ 9 am first and check the issue details and if there are user in system whose submission date is approaching for that user an automated email from system should be sent.


I dont have idea about batch and schedulers so i don''t know how do I actually accomplish this any help would be appreciated.

推荐答案

请参阅本文以了解基本的发送邮件方法 SendMail 101-如何通过SMTP(C#和ASP.NET)发送电子邮件 [ ^ ]

当系统运行时,您可以获得即将提交日期的用户列表,并使用该文章方法向他/她发送自动电子邮件
refer to this article to understand basic send mail method SendMail 101 - How to send e-mails over SMTP (C# and ASP.NET)[^]

when your system run, you can get the list of user whose submission date is approaching and use that article method to send automated email to him/her


实际上,该文章告诉您如何发送电子邮件,而不是如何使其自动化.因为您的数据库和ASP.NET都是无状态的,所以最好的选择是构建一个为您发送电子邮件的服务,因为它可以读取您的数据库以确定需要发送什么电子邮件,然后再发送它们.若要使用Outlook,您需要使用MAPI,而不是本文中描述的方法,该方法直接通过服务器发送并且不使用Outlook.
Actually, the article tells you how to send emails, but not how to automate it. Because both your DB and ASP.NET are stateless, your best bet is to build a service that sends emails for you, as it can read your DB to work out what emails need to be sent, and then send them. To use Outlook, you need to use MAPI, not the method described in the article, which sends via a server directly and does not use Outlook.


使用SMTP服务器,也许在Exchange上Outlook客户端连接到的服务器,以向用户发送电子邮件.
然后使用此技巧发送在C#中发送电子邮件带有或不带有附件:通用例程. [ ^ ]

使用MySql计划发送电子邮件的时间,然后使用Windows Scheduler以您定义的时间间隔运行程序.

程序运行时,它将与MySql进行核对,以获取所有必须获得电子邮件的用户.
Use a SMTP server, perhaps on the Exchange server where the Outlook client connects to send out emails to users.
And then use this tip for sending Sending an Email in C# with or without attachments: generic routine.[^]

Use your MySql to schedule when to send emails out and then use Windows Scheduler to run a program at intervals that you define.

When the program runs, it check with MySql to get all users that has to get an email.


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

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