From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | nidhi raina <nidhiraina(dot)12(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Is there a way to Send attachments with email using pgmail postgreSQl? |
Date: | 2016-12-19 17:36:49 |
Message-ID: | CAFj8pRBq=rPgY7M5c7+eqjnhhh5Ygm+7iS_kmW43sXyVQyhnnA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
2016-12-16 7:07 GMT+01:00 nidhi raina <nidhiraina(dot)12(at)gmail(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-12-19 17:52:28 | Re: JSON objects merge using || operator |
Previous Message | Christophe Escobar | 2016-12-19 17:05:57 | Avoid using index scan backward when limit order desc |