SendMailTask::FileAttachments Property

 

Gets or sets the names of the files attached to the e-mail message, delimited by the pipe character (|) when there is more than one file.

Namespace:   Microsoft.SqlServer.Dts.Tasks.SendMailTask
Assembly:  Microsoft.SqlServer.SendMailTask (in Microsoft.SqlServer.SendMailTask.dll)

public:
property String^ FileAttachments {
	virtual String^ get() sealed;
	virtual void set(String^ value) sealed;
}

Property Value

Type: System::String^

A String containing the names of the files attached to the e-mail message.

You can either attach a static copy of a file when you create the task by specifying the file name in the FileAttachments property, or you can point to the location of a file by using a variable, a configuration, or a property expression to send a dynamically updated file at run time instead. This feature is useful for sending attachments such as log and exception files. You can include multiple attachments in a task by separating the file names with the pipe character (|).

System_CAPS_noteNote

If an attachment file does not exist when the package runs, the package raises an error message.

The following code sample creates, configures, and executes a new SendMailTask that uses the FileAttachments property.

No code example is currently available or this language may not be supported.
Return to top
Show: