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