Prior to Oracle 9i you could not send an attachment using UTL_SMTP. You had to have JAVA VM and use Java Mail to...
perform the task.
Starting with Oracle 9i UTL_SMTP has introduced some primitives that let you perform the desired task. The demo below is the courtesy of Oracle Technology Network and I have provided the example for your review.
UTL_SMTP is very low level and a simple task of sending a plain text may require multiple calls. Keep that in mind. The maildemo package presents a higher level API that makes the task a bit easier for application programmers.
You can send an e-mail with attachments by:
- Addressing it and setting the message MIME-Type
- Ensuring the message parts are defined modularly
- Adding character attachment(s) with defined MIME type
- Adding binary attachment(s) with defined MIME type and encoding scheme
- Stating whether each attachment is to be inline or not
Dig Deeper on Using Oracle PL-SQL
Related Q&A from Azim Fahmi
There are several ways to back up a database, including schema, table and full exports, as well as hot and cold backups. Here are descriptions of ... Continue Reading