POP3it Pro

Email downloading made easy.

<- Back to POP3it Pro function list

POP3it_Adv_SaveAttachment

Description

This function extracts one or all Attachments out of the current email and saves it/them to the hard drive in the Account's Attachment Path. If you do not specify the Number or if you specify 0, all Attachments in the current email will be saved out, otherwise, the specific Attachment you specify will be saved out. If you are only saving out one Attachment, you can optionally specify the File Name for that Attachment with the second parameter. If the GetRefInline parameter is set to True, this function extracts any Inline Images Referenced by the HTML in the email.

Return Type
Text
Format
POP3it_Adv_SaveAttachment ( Number ; FileName ; GetRefInline )
Optional Parameters
  • Number

    Which Attachment to save to the hard drive. (If not specified, All Attachments will be Saved to the Hard Drive.)

  • FileName

    An alternate File Name for the Attachment. (Default is the FileName of the Attachment as specified in the Current Message.)

  • GetRefInline

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

Related Items
POP3it_Adv_GetAttachment, POP3it_Adv_GetAttachmentCount, POP3it_Adv_GetAttachmentFileName, POP3it_Adv_GoToMessage
Examples

Example 1

Code:

POP3it_Adv_SaveAttachment

Result:

Saves out all Attachments from the current email.

Example 2

Code:

POP3it_Adv_SaveAttachment( 2 )

Result:

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

Example 3

Code:

POP3it_Adv_SaveAttachment( 1 ;"Import.csv")

Result:

Saves out the first Attachment with the custom name, "Import.csv".

Example 4

Code:

POP3it_Adv_SaveAttachment( 0 ;""; True )

Result:

If there are any Referenced Inline Images, this would save them all out.