发送自动电子邮件 [英] Send automated email

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

问题描述

我想根据数据库中的插入和/或更新将自动电子邮件发送给UserType(请求者,受让人,审阅者,管理员).

I want to send automated emails to UserType( requester, assignee ,reviewer,admin) based on an insert and.or update in Database.

EX:

如果审阅者在分配给他/她的日期之后的7天内无法审阅数据,则剩余的电子邮件发送给请求者,受让人,审阅者和管理员.

A remainder email send to requester, assignee ,reviewer and admin if the reviewer is not able to review the data in 7 days from the date it is assigned to him/her.

我知道我可以使用SQL JOB或Windows Services来做到这一点.但是我可能会寻找其他方式来做到这一点,并且/或者SSIS是否提供这种功能?

I know I can do this with SQL JOB or with Windows Services. But I ma looking for different way to do this if possible and/or does SSIS provide such functionality?

推荐答案

我认为另一种选择是在需要监视的表的插入/更新上设置触发器,然后调用使用msdb.dbo.sp_send_dbmail的存储过程发送电子邮件.

I think another option is to setup the trigger on insert/update of tables that need to be monitored then then called a stored procedure that use msdb.dbo.sp_send_dbmail to send out email.

您可以查看这篇文章中的答案,以获取有关如何使用sp_send_dbmail发送电子邮件的参考. 在SQL Server 2008 R2中发送电子邮件.希望对您有所帮助.

You can look at the answer in this post for reference on how to send email using sp_send_dbmail. Sending Email in SQL Server 2008 R2. I hope that helps.

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

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