Re: Sending Email
От | Jason Earl |
---|---|
Тема | Re: Sending Email |
Дата | |
Msg-id | 871ygodemk.fsf@npa01zz001.simplot.com обсуждение исходный текст |
Ответ на | Sending Email (denis@coralindia.com) |
Ответы |
Re: Sending Email
|
Список | pgsql-novice |
denis@coralindia.com writes: > Hi all, > > Is there any package / procedure in PostGres to send email (like > UTL_SMTP in Oracle) > > Thanx > > Denis The way to do this in a transaction safe way is to have some sort of process that runs outside of PostgreSQL. You put the information necessary to generate your email into a table, and then you call the process (probably from cron). This makes it much easier to do error checking. Instead of firing triggers from PostgreSQL and hoping that the mail actually gets sent. You simply select from your outgoing mail table, create the necessary emails, and remove the entries in the table. This allows you to rollback changes to your database on failure, and guarantees that a problem with your email setup won't send valuable mail to the bit bucket. Besides, generating and sending email is probably easier to do from Python or Perl than any method available internally to PostgreSQL. Jason
В списке pgsql-novice по дате отправления: