How about something like:

CREATE OR REPLACE PROCEDURE send_mail (
sender IN VARCHAR2,
recipient IN VARCHAR2,
subj IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'mail.toolsyndicate.com';
c utl_smtp.connection;
PROCEDURE send_header( name IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
END;
BEGIN
c := utl_smtp.open_connection(mailhost,25);
utl_smtp.helo(c, mailhost);
utl_smtp.mail(c, sender);
utl_smtp.rcpt(c, recipient);
utl_smtp.open_data(c);
send_header('From', sender);
send_header('To', recipient);
-- If you need to send mail to more than one receipient, uncomment the
-- following line(s) as appropriate. Please don't forget the ","
-- in the "To" line before the next receipient's email id. You can't
-- use a comma separated list in the receipient parameter.
-- For variable number of "To"'s and "Cc"'s have multiple calls to
-- "send_header" function inside a cursor for loop.
-- Similar comments apply for "Cc" too.
-- send_header('To', ',[email protected]');
-- send_header('Cc', ',[email protected]');
send_header('Subject', subj);
utl_smtp.write_data(c, utl_tcp.CRLF || message);
utl_smtp.close_data(c);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
utl_smtp.quit(c);
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;


-amar