Oracle PL/SQL/System Packages/UTL MAIL
UTL_MAIL package enables you to send and receive e-mail, along with attachments, CC, BCC, and return receipt features.
CONNECT sys/sys_passwd
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.sql
--define the SMTP_OUT_SERVER parameter in your init.ora initialization file
--ALTER SYSTEM SET smtp_out_server="my.domain.ru" SCOPE=SPFILE;
BEGIN
UTL_MAIL.send(sender => "s@n.org",
recipients => "s@y.ru",
cc => "s@a.ru",
bcc => "s@h.ru",
subject => "Testing the UTL_MAIL Package",
message => "If you get this, UTL_MAIL package
really works!");
END;
/
--