imap

command module
v0.0.0-...-8835833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README


{ "image": "direktiv/imap", "desc": "reads the first message of an email inbox." }

IMAP

Reads the first message of an email inbox.

Direktiv

An example workflow of using the container on Direktiv.

id: imap-listener
functions:
- id: imap
  image: direktiv/imap:v1
description: Reads the first message of an email inbox
states:
- id: read-msg
  type: action
  action: 
    function: imap
    secrets: ["EMAIL", "PASSWORD"]
    input:
      email: jq(.secrets.EMAIL)
      password: jq(.secrets.PASSWORD)
      imap-address: imap.gmail.com:993

Input

The input required to run the cotnainer needs a json struct like the following:

{
    "email": "jq(.secrets.EMAIL)",
    "password": "jq(.secrets.PASSWORD)",
    "imap-address": "imap.gmail.com:993"
}

Output

Returns the contents of an email body

Error

In the case that an error is encountered it will present in the following format:

{
    "errorCode": "com.imap.error",
    "errorMsg": "Something went wrong"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL