简体   繁体   中英

Email function for azure postgresql server

How can one write a code in azure postgresql server which can send email. As Azure postgresql sever is a fully managed by azure and no option is there for installing extensions apart from limited already available extensions.

You usually shouldn't send emails from the database. If the email sending becomes slow, you can get cascading locks. And if it fails, then what should you do? You can store the email to be sent in a table, then have a process written in you favorite language access the table to do the sending. Or you can set up LISTEN/NOTIFY to do the same thing. Or you could combine them, if you want the transactionality of a separate table but don't want the polling of checking on it periodically.

Another option of course is not to use hosting solutions which prevent you from doing what you want.

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