Hi

2016-12-16 7:07 GMT+01:00 nidhi raina <nidhiraina...@gmail.com>:

> Dear Sir/Mam,
>
> I am also trying to send emails with attachments.please help me out with
> this.
>
You can use a untrusted Perl or Python functions

http://www.perlmonks.org/?node_id=603769

here is one example
http://postgres.cz/wiki/PL/Perlu_-_Untrusted_Perl_(en)#Universal_notification_about_the_change_of_data_via_email

My warning - don't do it - Database is great for data manipulation, bad for
communication. Some principles are hard to mix inside database. I like a
stored procedures, all power of PostgreSQL, but the communication from
database was failure early or in long time.

Better to write simple daemon application, that can monitor table with
mails and sends mails related to new record there - you can use
LISTEN/NOTIFY mechanism for immediate signal from database to application

https://www.postgresql.org/docs/current/static/sql-notify.html

Regards

Pavel



> Regards,
> Nidhi
>

Reply via email to