---Tested on AIX 5 , Oracle 10.1 EE
create or replace
Procedure Sendemail
(
Receiver_1 Varchar2,
Subject Varchar2,
Message Varchar2,
exit_code OUT NUMBER
)
As
/*
start /oradata/db10g/rdbms/admin/utlmail.sql
start /oradata/db10g/rdbms/admin/prvtmail.plb
GRANT execute ON utl_mail TO cyag;
alter system set SMTP_OUT_SERVER='mymailServer' scope=spfile;
*/
Begin
Utl_Mail.Send('cyag@GATEWAY.nbg.com.cy',Receiver_1,Message => Message,Subject => Subject);
Exit_Code :=0;
Exception
When Others Then
exit_code :=1;
END SENDEMAIL;