Saturday, September 6, 2008

UTL_MAIL example

DECLARE
CRLF CHAR(2) := CHR(10) || CHR(13);

BEGIN
UTL_MAIL.SEND(
sender => 'test@test.com'
,recipients => 'test@test.com'
,cc => NULL
,bcc => NULL
,subject => 'Test Email'
,message => 'Test line1' || CRLF || CRLF
|| 'Test line2'
,mime_type => 'text/plain; charset=us-ascii'
,priority => 1
);
END;