Question Locked

How to trigger an event that causes an email to be sent?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there any way for an email to be sent out when data is saved to a database?

This would be an appointment entered on an html/coldfusion calendar with sql 2000 on the back end, Windows 2000 server.

2 replies

by mydiab

First avoid xp_sendmail which shipped with SQL 2000. It is a MAPI client and it will hang a spid and nothing but a re-boot will clear it. So what do you do? create your own smtp email procedure and call it from the trigger. There is a lot of code on the internet you can quickly find here is one I found.
http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure
Can't say I tested it, but we are using something similar.

This discussion is closed to new replies.