Well, this howto does not depend on APEX - it can be used within any Oracle database on any table. The only
(obvious) requirement is, that the table contains a DATE or TIMESTAMP column. And this blog posting shows, how
the contents of such an arbitrary table can be displayed within a desktop calendar application - we'll start with
creating the table.

Based on this data, we now want to generate a data format which a desktop application is able to understand.
ICAL is most appropriate here - it's pretty easy and understood by most calendar applications. Below is a
sample ...

This PL/SQL code works with the packages HTP, HTF and OWA_UTIL - so the output is to be
consumed over the HTTP protocol. In an APEX installation all we need is an Application Process
in order to publich the procedure. Without APEX we need to do some more work - since we cannot
just point the Thunderbird or MS Outlook application to the database. We need to provide an
HTTP endpoint, and for this we have the PL/SQL embedded gateway (there is another
blog posting about this). So, the next steps are about configuring the embedded gateway to enable
an HTTP endpoint for our "database ICAL service" ... let's assume, we did all the work within the
schema SCOTT.

When the HTTP endpoint is running, you might check your setup within Mozilla thunderbird or Microsoft Outlook; the following screenshots have been created with Thunderbird. Just create a new calendar, choose a Network calendar and use the following URL as the service location ...

http://{datenbank-hostname}:8080/ical/generate_ical

Setup a network calendar within Mozilla Thunderbird.

View the calendar contents (the table data) within Thunderbird.

The document within the german APEX and PL/SQL community also contains comprehensive setup guides for Outlook and Thunderbird - but in German language. So you might use a translation tool here ...

After a long period of time (2 and a haf years, to be exact), I finally managed to
release version 1.0 of my
PL/SQL Email Client project. And
these are the new features.

The GET_RECEIVEDATE function returns the timestamp at which the message has been received (not sent).

The MAIL_FILTER package allows to set server-side filters. The package will then retrieve not necessarily all
emails from within a folder, but only these which suffice the filter set by the programmer. Filtering is
done by the email server.

Beyond this, I did some internal optimizations: The java code now instantiates less objects.

So ... just try it out: The following SQL script retrieves all unread messages from your
Inbox folder. You just need to replace the connection details for your mail server - and make
sure that your database is able to reach the mail server via the network.

I already have the next "feature request" - but the next version will be there sooner than
2 1/2 years ...

One more thing: In the past, I got some emails telling me about the usage of the mail client
package or asking some questions. I'd like to collect this information here: So ... if you are using the
MAIL_CLIENT package (in production?) and don't mind, I'd be very happy if you wrote a few
words as a commect to this blog posting - thanks in advance.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle Corporation or Oracle Germany. The views and opinions expressed by visitors to this blog are theirs and do not necessarily reflect mine.