Oct 2, 2013 7:45:00 PM by Debbie Peabody
The email activity in Automation is a very important activity. Most automation scripts end with an email deploying a report or confirmation that the script is complete.
To start using Email you will need to set up the email server. Click or drag an email activity to the design surface. The minimum entries are tagged with red exclamation symbols. Your 'from' address can be auto populated by pressing the ellipse button. If you have windows security enabled you will need to authorize temporary access .
The server settings can be entered by clicking on the Email Server settings button. Only SMTP email is supported. You can ask your IT for the SMTP server address or press the ellipse for auto populate. Enter the port and logid for SSL connections.
If you would like to add attachments open the attachment editor. This editor will list all files that are generated from this script. Move the file from the left to right to add as an attachment. Or browse for a file from your hard drive.
The body of the email can be either entered by hand or a text of html file can be used. In this example if I change the export to an html file I can use this in the body of the email.
Emails can also be used to communicate an error has occurred in the script. To set this up, go to the settings activity and check the “Send email when an error occurs” option. Click on the Compose email to define the server and pot. Also select to attach the log file to the email. The log file is your main source of determining what happened. To provide more data for debugging, turn the logging level to Verbose. This will include more detail and when posting a question on the community about an error in automation, this will be the first thing I will ask for.
Once you have entered your error email settings once, they will be retained in your settings for the next time you use an email activity.
Including emails in your automation script is easy and an integral part of every script.
Written by Debbie Peabody
Debbie Peabody is a Software Development Team Lead. She joined Quest in 1997 coding for Quest’s SQL Tuning product SQLab. She brings many years of experience of development on database tool products and co-designed Toad Data Point.