简体   繁体   中英

Can I send mail from database(Notification to an email field in table) for all the new rows which are added to an SQL Table

Daily around thousands of entries would be added. I believe we can write a inserted trigger but is it advisable or if you can suggest another way to do so? It should send mail to an email field in the database for that row once its added to the table. There will be thousands of records daily.

Probably this answer will help you setting the sendmail trigger. In that answer it is also suggested an alternative: populate a queue table and use a background task for sending the email. According to me, the latter is the best way. Pay attention, sending thousands emails every day can expose your server to be blacklisted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM