As a part of my daily operations i need to run a procedure, get the output in a notepad and copy some part in mail and send it to business... If I can shoot a mail from d/b, then it would save some good time. Is it really possible? If yes can anyone share some sample codes. many Thanks in advance!
Use UTL_SMTP to directly create mails from your plsql procedure. (example code) Caveat: the database server must be able to access the mail server; in some organisations, firewall rules prevent that.
Oracle provides some packages which you can use to send mail Following link talks about it
link texthttp://www.orafaq.com/wiki/Send_mail_from_PL/SQL
This wikiarticle should help you: http://www.orafaq.com/wiki/Send_mail_from_PL/SQL
It is for Oracle 8 but it should work also with 10 or higher.
Edit: Dam to slow ^^
If you're on Oracle 10g or later you can also use UTL_MAIL (which is basically a wrapper on top of UTL_SMTP).
UTL_MAIL.SEND (
   sender     => 'me@host'
   recipients => 'you@host',
   subject    => 'test email',
   message    => 'Hello!');
But note - from the docs:
UTL_MAILis not installed by default because of theSMTP_OUT_SERVERconfiguration requirement and the security exposure this involves. In installingUTL_MAIL, you should take steps to prevent the port defined bySMTP_OUT_SERVERbeing swamped by data transmissions.You must both install
UTL_MAILand define theSMTP_OUT_SERVER.To install UTL_MAIL:
sqlplus sys/<pwd> SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.plbYou define the
SMTP_OUT_SERVERparameter in the init.ora rdbms initialization file.