如何使用Windows任务计划程序和MVC5发送电子邮件通知 [英] How can I send email notification using windows task scheduler and MVC5

查看:211
本文介绍了如何使用Windows任务计划程序和MVC5发送电子邮件通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC 5 Web应用程序,其中有作业调度程序,为此,我们有一个窗口任务调度程序,它发送待处理文档的电子邮件通知,如果我有10个待处理文档,10个人,其中任何一个打开那么就不会发送休息待处理文件的提醒。



任何人都知道为什么?



我尝试了什么:



ASP.net MVC 5和Windows任务计划程序

I have an MVC 5 web application and in that, there is job scheduler and for that, we have one window task scheduler which sends email notification for pending documents and if I have 10 pending documents for 10 people and any of them opens thenit won't send a reminder for rest pending document.

Anyone have any idea why?

What I have tried:

ASP.net MVC 5 and Windows Task Scheduler

推荐答案

由于您没有显示任何代码,我们几乎无法帮助您。



无论如何,猜测是你有一个全局变量控制是否发送电子邮件。在这种情况下,我会将一个属性与文件本身相关联,以检查是否需要通知该文件的所有者。此外,这将让我控制我有多少文件,以及有多少文件需要电子邮件通知。



如果你有一个自定义对象类型,那么它很容易,因为你只需要添加一个属性,比如修改。检查一个文件的此Modified属性不会对其他文件进行任何更改,并且不会更改其他文件的电子邮件传送。
Since you are not showing any code, there is little we can help you with.

Anyways, the guess is that you are having a global variable to control whether to send email or not. In this case, I would associate a property with the file itself to check if I need to notify the owner of that file or not. Also, this will let me control how many files I have, and how many of them need an email notification.

If you are having a custom object type then it would be easy as you would only need to add a property, something like, "Modified". Checking this Modified property for one file will not have any change on other files, and the email delivery for others would not be altered.


这篇关于如何使用Windows任务计划程序和MVC5发送电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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