Posts

Showing posts from August, 2012

Sending Mail from the database

Image
You should have an outgoing SMTP server IP to configure sending mail from the database. I already put it in the database server /etc/hosts as mailhost sqlplus / as sysdba @?/rdbms/admin/utlmail.sql @?/rdbms/admin/prvtmail.plb grant execute on UTL_MAIL to public; ALTER SYSTEM SET smtp_out_server = 'mailhost' scope=both; a simple example BEGIN UTL_MAIL.send(sender => 'Yossi@NixonIT.com', recipients => 'you@address.com', subject => 'Test Mail', message => 'Hello World', mime_type => 'text; charset=us-ascii'); END; / For further advanced options such as attachments see in this wiki