Re: Sending email from PL/pgSQL

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Sending email from PL/pgSQL
Дата
Msg-id CAKoxK+5NmFAo0c4Yr-d9t=mE4OMP4LXPahjinnnzfanFXeF9iQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sending email from PL/pgSQL  (Jack Kaufman <jack.kaufman@sanmina.com>)
Ответы Re: Sending email from PL/pgSQL  (Jack Kaufman <jack.kaufman@sanmina.com>)
Список pgsql-novice
On Wed, Aug 28, 2013 at 9:03 PM, Jack Kaufman <jack.kaufman@sanmina.com> wrote:
> Alan and Andreas,
>
> Thank you!  You both said essentially the same thing:  That I will need to
> write the email attributes to a table and have a script on the server call
> the email client.  So that is the way I will proceed.  Thank you both for
> your replies and for helping me move along toward solving this problem.

Here you can find a very rudimental pl/perl stored procedure that will
send simple emails:
https://github.com/fluca1978/fluca1978-pg-utils/blob/master/bsdmag/03-server-side-programming/15-email-perl.sql

However, depending on the aim of your mail messaging, I would consider
having a shell script fecthing data out of PostgreSQL on a per-cron
basis and arranging a message to pipe thru a mail program (mutt,
sendmail, postfix, whatever). This can be much more general and will
let you reuse the mailing part for other jobs.

Luca


В списке pgsql-novice по дате отправления:

Предыдущее
От: Jack Kaufman
Дата:
Сообщение: Re: Sending email from PL/pgSQL
Следующее
От: Jack Kaufman
Дата:
Сообщение: Re: Sending email from PL/pgSQL