How to Send Any Type of Attachment with UTL_MAIL (Doc ID 946811.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 10.1.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 6th Jan 2016***

Goal

To show you how to use the UTL_MAIL package to send any type of attachment:

using one simple PL/SQL stored procedure.

While there are two procedures that can be used to send attachments

only one of them is truely needed as SEND_ATTACH_RAW can send both Text-Based and Binary-Based attachments and will be used in the sample code below.

Note: Before running this sample code UTL_MAIL must be properly configured.  Refer to the PL/SQL Packages and Types Reference section on UTL_MAIL for more information on how to configure this package or contact your DBA for help.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms