Message Object : AddAttachment Method |
This method provides a simple way to attach a file to a message. The attributes of the file are determined by the file extension and AttachmentDefaults, which are used to correctly label and encode the file. Any number of attachments may be added.
The file does not have to exist yet, because the file is not read until encoding is performed. An error is generated if the file cannot be accessed.
This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):