如何配置电子邮件警报到表中包含的不同电子邮件地址 [英] How can I configure email alerts to different email addressed contains in a table
本文介绍了如何配置电子邮件警报到表中包含的不同电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的先生,
我已经配置了从您那里学到的数据库邮件。
现在我需要一个帮助。 />
请为我提供以下查询的步骤
1.我必须通过服务向不同的收件人发送邮件表中的收件人电子邮件地址
2.如何创建一个作业,系统必须根据从表中获取电子邮件地址并发送邮件的条件来执行查询。 br $> b $ b
亲切帮助
Dear sir,
I have configure the Data base mail as learnt from you.
now i need one help.
kindly provide me steps for the below query
1.I have to send mails to different recipients by taking the recipients email address from a table
2. how to create a job where in system has to exec a query based on the condition it has to fetch the email address from a table and sent a mail.
kindly help
推荐答案
我可能会:
- 创建程序它有一个光标来获取所需的行
- 循环游标并使用sp_send_dbmail发送电子邮件
- 使用SQL Agent计划执行该过程。
看看
- 创建程序 [ ^ ]
- DECLARE CURSOR [ ^ ]
- sp_send_dbmail [ ^ ]
- 创造一份工作 [ ^ ]
I probably would:
- Create a procedure which has a cursor to fetch the desired rows
- loop through the cursor and use sp_send_dbmail to send an email
- schedule execution of the procedure using SQL Agent.
Have a look at
- CREATE PROCEDURE[^]
- DECLARE CURSOR[^]
- sp_send_dbmail[^]
- Create a job[^]
这篇关于如何配置电子邮件警报到表中包含的不同电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文