如果在SQL Server中使用触发器将新记录插入到表中,则如何发送电子邮件 [英] How to send an email if a new record inserted in a table using Trigger in SQL Server
本文介绍了如果在SQL Server中使用触发器将新记录插入到表中,则如何发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以给我举个例子吗?
Can anybody send me an example? How to send an email with record detail if a new record inserted in a table using the trigger in SQL Server 2005?
推荐答案
亲爱的Moshin,
首先,尝试通过触发器发送电子邮件是一个非常糟糕的主意.浏览以下链接:-
通过SQL Server发送邮件 [ http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151399 [ ^ ]
用于配置SQL Server发送邮件:-
http://support.microsoft.com/kb/312839 [ http://blog .sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/ [ http://msdn.microsoft.com/en-us/library/ms190307.aspx [ ^ ]
希望这对您有所帮助.
谢谢
Dear Moshin,
First of all Trying sending an email through a trigger is a very bad idea. Have a go through these links:-
Send mail through SQL Server[^]
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151399[^]
For configuring the SQL Server for Sending mail:-
http://support.microsoft.com/kb/312839[^]
http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/[^]
http://msdn.microsoft.com/en-us/library/ms190307.aspx[^]
Hope this will help you out.
Thanks
检查此
从触发器发送数据库邮件 [
Check this
Send Database Mail from a Trigger[^]
这篇关于如果在SQL Server中使用触发器将新记录插入到表中,则如何发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文