邮件中C#的提醒设置 [英] Reminder Setting In C# For mail

查看:98
本文介绍了邮件中C#的提醒设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须在项目中创建提醒设置的新功能.

我必须将功能设置为需要几天的时间,然后将学生进度报告作为pdf文档发送到他的邮件ID.

我是新来的.

我正在将Visual Studio 2010与c#一起使用.

有人可以建议我该怎么做吗?

Hi all,

I have to create a new feature of reminder settings in my project.

I have to make the feature like it takes the number of days and send the student progress report to his mail id as a pdf document.

I am new for it.

I am using Visual studio 2010 with c#.

Can any one suggest me how can I do this?

推荐答案

听起来这是实现Windows Service应用程序的理想情况.该应用程序可以定期检查并查看是否有待处理的通知,以及是否将其发送出去.
This sounds like a perfect situation to implement a Windows Service application. That application can periodically check and see if notifications are pending and if they are send them out.


Hi Hiral,

尽管提供的详细信息很少,但是如果我在您身边,我将按照以下步骤进行操作.

1.创建一个具有ID,student_id,DatetoSend,状态等列的数据库表.

2.现在,当您必须创建提醒时,添加具有适当的DateTosend值的原始文件.

3.下一部分取决于您要如何处理.

3.a:一种方法是编写一个可以发送电子邮件的触发器,但这仅在您准备好PDF的情况下才有效.
3.b如果您需要用C#代码创建PDF,我将编写一个控制台应用程序,该应用程序可以读取数据库,创建PDF并发送电子邮件.然后,可以在Windows Scheduler的计划任务"中设置此应用程序.
3.c(如Marcus所建议)是一个Windows服务,该服务可读取db,准备PDF并发送邮件
4.更新数据库状态,以免再次发送邮件.

希望对您有所帮助.
如果确实将答案标记为解决方案和/或赞成.

谢谢
Milind
Hi Hiral,

Though the details provided is very less, If I were at you, I would have followed these steps.

1. Create a database table with columns like id, student_id, DatetoSend, status etc.

2. Now when you have to create a reminder, add a raw with appropriate DateTosend value.

3. Next part depends on how you want to handle.

3.a: One way is to write a trigger which can send email out but this will work only if you have PDF ready.
3.b If you need to create a PDF in C# code, I would write a console application which reads the database, creates PDF and send email. This application, then I can set in "scheduled tasks" of Windows Scheduler.
3.c (As Marcus suggested) A windows service which reads db,prepares PDF and sends out mail
4. Update database status so that you dont send the mail again.

Hope that helps to give some direction to you.
If it does mark the answer as solution and/or upvote.

Thanks
Milind


您可以根据需要实现Windows服务.请看以下链接:
使用C#自动发送电子邮件 [
You can implement windows service for your requirement. Please have a look at following link:
Automatic Emails in C#[^]


这篇关于邮件中C#的提醒设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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