One is running TOAD for Oracle 10.6 and use the automation tool to run SQL.
Want to be able to run a query in which my output is a list of e-mail addresses.
It is desired to insert that list into the To: line of the e-mail utility, but have been unable to automate that process.
Process has been simplied in Toad for Oracle 12.0 .
The latest version of Toad for Oracle can be downloaded at: https://support.quest.com/download-product-select
Use the attached is a generic email app as an template. Import the app, and change the required parameters in the steps below.
1) Import the app
2) Double click on 'Export Dataset1' and change the query under the Dataset tab to extract the email address from your database table/column. Apply the changes.
3) Double click on 'Email1' and change the SMTP Server to your local server name.
4) Click on Email_App on LHS
5) Click 'Run Selected Apps'
This will…
1) Create a directory called 'C:\AD_Email'
2) Get a list of email addresses from the table specified and create a file called: 'email_addresses.txt' in the directory created in first action
3) Loop thru each email address in the file and send an email to the addresses specified. It will also contain an attachment with the list of email addresses.
4) The file will be deleted.
5) The directory will be deleted.