Summary
In some cases it may be useful to e-mail a file produced by a scheduled program. For example, after a report generation program is run, you may want to e-mail the report file produced by the program to the appropriate people.
This can be easily be accomplished using freely-available third-part utilities.
More Information
To do this you will need to use a third-party utility that is capable of sending e-mail messages with attachments from the command line. One popular and freely-available utility is BLAT.
Begin by creating a scheduled task that does the e-mail notification. The following example uses BLAT; substitute the appropriate syntax if you are using another utility. Your scheduled task would look something like this:
Description: Send Report 31a
Application: c:\blat\blat.exe
Command line parameters: -to [email protected] -s "Report for review" -body "here is today's report" -f [email protected] -server mail.yourdomain.com -attach c:\reports\report31a.rpt
This sample will send the report file "c:\reports\report31a.rpt" to the user "[email protected]" through the SMTP mail server "mail.yourdomain.com" using a return address of "[email protected]".
Then modify the scheduled task that runs the report program. On the Actions page, check the option to have the Scheduler execute an action if the report program runs successfully, then select the reporting task you just created as the action to execute.
When the reporting task runs successfully the Scheduler will run the notification task to e-mail the report file.
Note: BLAT is used here for illustrative purposes only. We are in no way affiliated with the BLAT program and cannot provide support on issues related to it or any other mail utility.