如何使用mysql事件自动发送消息? [英] How to send message automatically with mysql events?

查看:400
本文介绍了如何使用mysql事件自动发送消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有mysql数据库,这个数据库包括出生日和客户的邮件地址。

我写asp.net网络应用程序

我想每天都做我会检查生日与系统日期,如果它是相同的事件发送我生日和邮件地址c#代码后面。所以我会写多个发送邮件代码。



如何做到这一点?

I have mysql database and this database include birth day and mail adres for customers.
I write asp.net web application
I want to do every day I will check birthdays with system date if it is equal event send me birthday and mail addreses to c# code behind.so I will write multiple send mail code.

how to do that?

推荐答案

我不会用ASP.NET做这个:) ASP.NET不是为这样的任务设计的。

好​​的,这里是一个简单的解决方案



1.创建控制台应用程序,选择今天过生日的客户并发送电子邮件给他们。

2.登录到您的一个服务器和创建Windows计划任务,它在给定时间每天运行。作为动作浏览并提供您的exe文件。



完成:)
I will not do this using ASP.NET :) ASP.NET is not designed for such task.
Ok, here is simple solution

1. create console application which select customers who having birthday today and send email to them.
2. log in to one of your server and create windows scheduled task which running every day at given time. as a action browse and give your exe file.

Done :)


你可以为将在backgroung中运行的同一个pupose创建窗口服务并触发一个动作预定义时间并执行您的逻辑。你可以在那时发邮件。
you can create window service for the same pupose that will run in backgroung and trigger an action on the predefined time and execute your logic. you can send mail at that time.


这篇关于如何使用mysql事件自动发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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