In 8i or, in 11g, if you want to send more than one attachment or an attachment more than 32K in length you will need to do the mime encoding yourself.
Main Topics
Browse All TopicsHow do you do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here's a sample package that includes support for arbitrary number of attachments of any size. It will work in 8i through 11g.
Note, in 9i and above, the encoding can (should) be done using utl_encode, but in 8i you will need to use the encoding procedure included in this package
http://www.oracle.com/tech
Business Accounts
Answer for Membership
by: schwertnerPosted on 2009-11-03 at 05:06:14ID: 25728497
Setup UTL_MAIL in Oracle 11g
0\db_1\RDB MS\ADMIN\u tlmail.sql
0\db_1\RDB MS\ADMIN\p rvtmail.pl b
********** ********** ********** ******** ********** ********** ********** ********/
m/t/93215/ 0/
Install UTL_MAIL:
# SQLPLUS SYS AS SYSDBA
SQL> @ C:\Oracle11g\product\11.1.
SQL> @ C:\Oracle11g\product\11.1.
You define the SMTP_OUT_SERVER parameter in the init.ora rdbms initialization file.
However, if SMTP_OUT_SERVER is not defined, this invokes a default of DB_DOMAIN
which is guaranteed to be defined to perform appropriately.
ALTER SYSTEM SET smtp_out_server = 'donkey.www.int' SCOPE=BOTH;
'donkey.www.int' is the name of a Mail server
Ensure that you are connected as SYS using the SYSDBA privilege,
and then grant the following privileges to the Database Vault Owner account.
For example:
CONNECT SYS/AS SYSDBA
Enter password: password
GRANT CREATE PROCEDURE, DROP ANY PROCEDURE TO dbvowner;
GRANT EXECUTE ON UTL_TCP TO dbvowner;
GRANT EXECUTE ON UTL_SMTP TO dbvowner;
GRANT EXECUTE ON UTL_MAIL TO dbvowner;
GRANT EXECUTE ON DBMS_NETWORK_ACL_ADMIN TO dbvowner;
The UTL_TCP, UTL_SMTP, UTL_MAIL, and DBMS_NETWORK_ACL_ADMIN PL/SQL packages
are used by the e-mail security alert that you will create.
Connect to SQL*Plus as the Oracle Database Owner (DV_OWNER) account.
For example:
CONNECT dbvowner
Enter password: password
Create the following procedure:
/*************************
**
** The Procedure
**
**************************
CREATE OR REPLACE PROCEDURE email_alert AS
msg varchar2(20000) := 'Realm violation occurred for the ALTER TABLE Command Security Policy rule set. The time is: ';
BEGIN
msg := msg||to_char(SYSDATE, 'Day DD MON, YYYY HH24:MI:SS');
UTL_MAIL.SEND (
sender => 'Oracle@instance.orcl',
recipients => 'somebody@www-global.com',
subject => 'Table modification attempted outside maintenance!',
message => msg);
EXCEPTION
WHEN others THEN
dbms_output.put_line(' Error Encountered.');
END email_alert;
/
set serveroutput on
execute email_alert;
About attachments:
http://www.orafaq.com/foru