The SendMailTask object lets you send an e-mail as a task. For example, if you want to notify a database administrator about the success or failure of a particular task (such as a backup), you can link a SendMailTask object with a precedence constraint to the previous task. To use a SendMailTask, the computer must have the Microsoft® messaging API installed with a valid user profile.
A SendMailTask can include attached data files. You can point to a location for an attached file and send a dynamically updated file, rather than a static copy of the file fixed when you create the task. This feature is useful for sending attachments, such as log and exception files, which contain information that changes constantly, and for which the file may not exist when the package is created (at design time).
Note If you enter an attachment file name and path that does not exist when the package is run, with some versions of the messaging API you receive the message: "Error sending mail: Internal MAPI error: the address book has no directories that contain names." This message indicates the file does not exist at the specified location, or that access permissions are not granted for the file. To fix the error, make sure that the file is available at the specified location when the package is run, or that access is granted.