Send query result from Apex 5.0 application as HTML Email

Sreejith 's Blog

Recently I had a requirement to send a HTML based email from my apex application. The HTML content was actually the result of an sql query I run on my application database.

I used UTL_SMTP with database stored procedure to send mails in a plain text format already in my application.New requirement to send HTML based emails from UTL_SMTP looked bit complex and more coding effort. This can be easily achievable using APEX_MAIL.

To use APEX_MAIL package we have to configure Apex environment and database

http://docs.oracle.com/cd/E59726_01/doc.50/e39151/adm_wrkspc002.htm#AEADM29176

1. Enabling Network Services

If you are running Oracle Application Express with Oracle Database 11g or later, you must enable outbound mail. Starting with Oracle Database 11g Release 1 (11.1), the ability to interact with network services is disabled by default.

By default, the ability to interact with network services is disabled in Oracle Database 11g or later. Therefore, if you are running Oracle…

View original post 192 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s