My Oracle Support Banner

How to Send a Mail from Within PL/SQL and Java Stored Procedures. (Doc ID 73321.1)

Last updated on JULY 08, 2021

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.8 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 27-Sept-2016***



Purpose

This article contains an example of how to send an email message from a Java stored procedure.

The JavaMail classes are part of the Oracle JVM from version 9.2 of the database.  Additional information on the JavaMail API can be found at:

http://javamail.kenai.com/nonav/javadocs/index.html

The example in this article has been tested with the following versions:

Oracle Database 9.2.0.8, 10.1.0.5, 10.2.0.5, 11.1.0.6, 11.1.0.7, 11.2.0.4, 12.1.0.2.

Scope

This article is intended for users developing Java in the database. Users should have some Java knowledge in order to understand the code.  As specific permissions are required to execute the Java stored procedure, a DBA user may be needed to grant missing permissions to executing users.

Details

To view full details, sign in with your My Oracle Support account.

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


In this Document
Purpose
Scope
Details
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.