Dart Smtp, Pop, Imap Controls
AddAttachment Method
Fully qualified path of the file to attach.
Description
Attach a file to the message.
Syntax
Visual Basic
Public Function AddAttachment( _
   ByVal FileName As String _
) As Part
Parameters
FileName
Fully qualified path of the file to attach.
Return Value
The Part Object created and added to the message's Parts property.
Remarks

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.

Error Codes

This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):

See Also

Message Object  | Message Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic