In the Oracle database there are two PL/SQL APIs to send mails: UTL_SMTP and UTL_MAIL. But there is no package which is able to retrieve messages from a mailbox on a server. The here provided package MAIL_CLIENT closes this gap.
This package writes RFC conforming MIME mail bodies via utl_smtp.
It allows for simple text messages, HTML messages with embedded images etc., as well as attachments.