Sending mail from Databases and Scripts

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 4 Oct 2017 10:13:18 -0700
Message-ID: <CAORjz=N4MAcLmNJKg=zTWdjKRaSJnhYE5nvR=XUf25FO=mxnfg_at_mail.gmail.com>



How often have you wanted to send email directly from scripts and/or databases, only to realize you do not have an email server setup, and do not want to deal with setting one up?

That is a situation I have been in a number of times.

Most recently I wanted to send email from an Oracle package while developing client code in my lab.

Eventually the client can do so and use their own email server.

I've setup email in the past a few times, and it always a chore.

Then I learned about Amazon Simple Email Service (SES)

This was intriguing, and inexpensive.

Here's a blog of what I found necessary to make it work from Oracle.

http://bit.ly/oracle-aws-ses

Bear in mind this is just proof of concept code, far, far from anything useful for production or serious testing.

Real code would most likely make use of Advanced Queuing, allowing the sender to just push the email on a stack, and let DBMS_SCHEDULER worry about keeping the actual email code running. (Sometimes it may take a few seconds to make the email server connection)

Enjoy :)

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Principal Consultant at Pythian
Pythian Blog http://www.pythian.com/blog/author/still/ Github: https://github.com/jkstill

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 04 2017 - 19:13:18 CEST

Original text of this message