I have the checkbox in the front end called "Ticket". If Ticket checkbox is clicked then an email will be sent to the reciepents. Here I know who are the reciepients, so that is not the problem. Also email body is ready. Only, I want the condition in the query when the ticket check box is clikced that email should be sent. There is also the hasticket bit field in table which I am using. So initially, this hasticket field will be 0. How I can achieve this? This is the sample data: Pass NO. hasticket name A1234 0 abc
当我点击前端的复选框时,应该向abc发送一封电子邮件。
这就是我所拥有的:存储了proc sppass_update,它将更新表中的hasticket字段。所以首先我需要使用这个存储过程来更新表。然后我可以发送电子邮件。我怎么能搞这个
答案 0 :(得分:1)
使用SQL Server的数据库邮件组件:
sp_send_dbmail
系统过程,以使用您配置的配置文件发送电子邮件。SQL Server将发送电子邮件。