POP3it Pro

Email downloading made easy.

<- Back to POP3it Pro function list

POP3it_Adv_GetAttachment

Description

This function returns an Attachment from the current email as a "Stored" Container object. If you specify True for the optional ByRef parameter, POP3it Pro will save the Attachment to the hard drive in the folder specified by the Account's Attachment Path setting and return a "By Reference" Container object. ("By Reference" Container objects only store a reference to an external file, whereas a "Stored" Container object actually stores the file inside your database.) If you specify True for the optional GetRefInline parameter, the plug-in will return an Inline Image Referenced by the HTML in the email.

Return Type
Container
Format
POP3it_Adv_GetAttachment ( Number ; ByRef ; GetRefInline )
Required Parameters
  • Number

    The Attachment Number to return from the Current Message.

Optional Parameters
  • ByRef

    If True, the Attachment will be exported to the default Attachment Path and a "By Reference" Container object will be returned. (Default is False.)

  • GetRefInline

    If True, this function will return any Inline Images Referenced by the HTML. (Default is False.)

Related Items
POP3it_Adv_GetAttachmentCount, POP3it_Adv_GetAttachmentFileName, POP3it_Adv_GoToMessage, POP3it_Adv_SaveAttachment
Examples

Example 1

Code:

POP3it_Adv_GetAttachment( 2 )

Result:

If there are at least two Attachments in the current email, this would return the second one.

Example 2

Code:

POP3it_Adv_GetAttachment( 1 ; True )

Result:

This would save out the first attachment to the hard drive and return a "By Reference" Container pointing to the attachment.

Example 3

Code:

POP3it_Adv_GetAttachment( 1 ; False ; True )

Result:

If there is a Referenced Inline Image in the email, this would return the first Referenced Inline Image.