Skip to content

beezwax/bzmb-emailattachmentdownloader

Repository files navigation

Introduction

A bzBond-server microbond to download email attachments via IMAP.

Installation

Installation on macOS/Linux

On macOs/Linux use the following command to install this Microbond:

/var/www/bzbond-server/bin/install-microbond.sh bzmb-emailattachmentdownloader https://github.com/beezwax/bzmb-emailattachmentdownloader

Installation on Windows Server

On Windows Server use the following command to install this Microbond:

powershell -File "C:\Program Files\bzBond-server\bin\install-microbond.ps1" bzmb-emailattachmentdownloader https://github.com/beezwax/bzmb-emailattachmentdownloader

Installation with a proxy on macOS/Linux

On macOs/Linux use the following command to install this Microbond via a proxy:

/var/www/bzbond-server/bin/install-microbond.sh bzmb-emailattachmentdownloader https://github.com/beezwax/bzmb-emailattachmentdownloader http://proxy.example.com:443

Installation with a proxy on Windows Server

On Windows Server use the following command to install this Microbond via a proxy:

powershell -File "C:\Program Files\bzBond-server\bin\install-microbond.ps1" -Proxy http://proxy.example.com:443

Usage

The bzmb-emailattachmentdownloader Microbond provides one route

bzmb-emailattachmentdownloader-getAttachments

In a server-side FileMaker script run bzBondRelay script with parameters in the following format:

{
  "mode": "PERFORM_JAVASCRIPT",

  "route": "bzmb-emailattachmentdownloader-getAttachments",

  "customMethod": "POST",

  "customBody": {
    
    // Required. The imap config object. See https://imapflow.com/module-imapflow-ImapFlow.html#ImapFlow for details
    "imapConfig": object,

    // Optional. The mail folder to move processed emails to
    "processedFolder": "string",

    // Optional. Also process read mails in the Inbox. Default is false
    "includeRead": boolean,

    // Optional. Do not mark emails as read or move them. Default is false
    "readOnly": boolean
  }
}

The attachments and filenames can be accessed in a JSON array via Get ( ScriptResult ): JSONGetElement ( Get ( ScriptResult ); "response.result" )

bzmb-emailattachmentdownloader-getMessagesWithAttachments

In a server-side FileMaker script run bzBondRelay script with parameters in the following format:

{
  "mode": "PERFORM_JAVASCRIPT",

  "route": "bzmb-emailattachmentdownloader-getMessagesWithAttachments",

  "customMethod": "POST",

  "customBody": {
    
    // Required. The imap config object. See https://imapflow.com/module-imapflow-ImapFlow.html#ImapFlow for details
    "imapConfig": object,

    // Optional. The mail folder to move processed emails to
    "processedFolder": "string",

    // Optional. Also process read mails in the Inbox. Default is false
    "includeRead": boolean,

    // Optional. Do not mark emails as read or move them. Default is false
    "readOnly": boolean
  }
}

The messages with attachments can be accessed in a JSON array via Get ( ScriptResult ): JSONGetElement ( Get ( ScriptResult ); "response.result" )

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published