如何在特定时间发送包含Excel工作表附件的电子邮件 [英] How can send an email with excel sheet attachment on specific time

查看:90
本文介绍了如何在特定时间发送包含Excel工作表附件的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是在ASP.NET MVC4中发送带有特定时间的Excel工作表附件的电子邮件。这意味着我有一个基于Web的应用程序,它是使用ADO.NET在ASP.NET(MVC4)剃须刀上开发的,所以我的要求是从数据库中获取所有条目并转换为excel表,然后每天早上06:00发送每天记录怎么办????

My requirement is to send an email with excel sheet attachment with a specific time in ASP.NET MVC4. That means i have an web based application which is develop on ASP.NET(MVC4)razor with ADO.NET so my requirement is to fetch all entry from database and convert to excel sheet then send every days record on every morning at 06:00AM what can do????

推荐答案

您好,



您可以创建一个Windows服务(调度程序) )。在该调度程序中,您可以编写逻辑以从数据库中获取记录并创建Excel文件并将其保存在具有日期的Temp文件夹中,并通过电子邮件将该文件发送到所需的电子邮件ID。



这将满足您的要求。
Hello,

You can create one windows service(scheduler). In that scheduler you can write the logic to Fetch the records from database & Create excel file & keep that in a Temp folder with the date and Send that file via email to the desired Email ID.

This will fulfill your Requirement.


这篇关于如何在特定时间发送包含Excel工作表附件的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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