Email :: attachment - Get attachment from email
The function may be called after reading an email via getMail() in order to get one or more attachments. When no attachment could be returned, the function throws an exception.
Implementation details
The function returns the attachment from the email passed in cEmail at position passed in iPosition in the calling email object. The number ranges from 1 to attachmentCount().
An attachment is considered as embedded mail. Thus, the Email object has to be passed in rEmail, which contains an Email object, that has been filled by getMail(). Attachment properties are loaded to the calling object. Usually, attachment data is available in binaryBody. but there is also a string version available in body. Other properties as name or file name may be obtained from the attachment Email object.
- rEmail - - internal feature (not documented)
- iPosition
- Position in collection
The position of an element in a collection is beginning with 0 for the first element.