Sending email from PL/pgSQL

From: Jack Kaufman <jack(dot)kaufman(at)sanmina(dot)com>
To: PGSQL-Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Sending email from PL/pgSQL
Date: 2013-08-28 16:39:14
Message-ID: CAM=VM81bk0RRNgsu3O-+q8GHxMOZNCcS7Xx-u2Gijk-mMwmDfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

PostgreSQL 9.2

Hello,

We are a new PostgreSQL site. I want to send emails from within a PL/pgSQL
function. Email addresses, subject lines, etc., would be retrieved from
fields in a record that had been previously populated by users in a GUI.

I have found the following file on the server:

/mes/mds/tinmon/proc/sendmail/sendmail.jar

I have used "sendmail" in the past but it was in different environment; and
it wasn't a ".jar" file, either. So I'm not sure how to proceed. It
doesn't have to be "sendmail", either. I've used "mutt", too, but I can't
find "mutt" on the PostgreSQL server. Just about any email client would be
fine.

Would someone provide an example of how to send email from a PL/pgSQL
function?

Thanks in advance.

Jack

--
Jack Kaufman
MDS Application Devl (US)
Sanmina-SCI Corporation - Owego site
Email: jack(dot)kaufman(at)sanmina(dot)com
Skype: jack_kaufman_sanm
607-723-0507

CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina Corporation (or any of its subsidiaries), or any other person or entity.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alan Hodgson 2013-08-28 16:55:28 Re: Sending email from PL/pgSQL
Previous Message David Johnston 2013-08-27 19:33:45 Re: cross-table constraints?