This content has been marked as final. Show 4 replies
suppose you have the query as
select * from emp where rowid<3;
write the query in the emp.sql query at any directory like d:\sqljobs\emp.sql
the call make a batch file like sndml.bat and write the following codes
sqlplus scott/tiger@orcl @d:\sqljobs\emp.sql
explorer mailto:firstname.lastname@example.org d"\sqljobs\myrep.txt
or if you are using any mailing software then you can use that..
You can do this 100% in PL/SQL as a stored package. Within the package, call utl_smtp to send the email. An example - http://www.dba-oracle.com/t_utl_smtp_utility.htm.
Generated dynamic report should be sent as an attachment to the specified mail id's. which oracle API will support it.?
If utl_smtp does this job. then how to do settings/configure in oracle and configure SMTP server at local system to test it.
See http://www.myoracleportal.net/blog1.php/2009/02/01/plsqlemail. This should have everything that you need to send attachments via utl_smtp.