Description

The Email listener reads email messages from a configured email account through IMAP or POP3 and sends them to 1Gateway. Supports attachments. 


Prerequisites

  • (Optional) Create a directory where to move the emails to after they are read.
  • If needed, enable POP3 protocol on the email server

Installation

Make sure you have the 1gateway zip file that includes the plugin files and valid licences information ready. This file has been provided to you with the installation files.

1 - Login

Login to 1gateway, and make sure you are in "Advanced mode". If this is the first time you log in, the default user and password are both 'admin' (without the quotes).

2 - System Maintenance

Click on the menu icon and choose the option "System maintenance"


3 - Upload file


In the System maintenance view you can either drag and drop the downloaded zip file or select it by clicking the "choose file" button.

Configuration


Open the main menu and click on "New plugin"

Select the plugin you want to configure. Use the Filter field if needed.

Field name

Supported values

Description

Email server

Any string

Email server to connect to

Email user

Any valid email address

Email address which to obtain emails from

Password

Any string

Password of the email user

Authentication typeBasic, OAuth2Type of authentication to use when connecting to the email server.

Server type

POP3, IMAP, POP3 with SSL, IMAP with SSL/TLS

Protocol to use when connecting to the email server.

OAuth Client IDAny stringOnly used if OAuth2 authentication type is selected. OAuth Client ID used for the authentication.
OAuth Client SecretAny stringOnly used if OAuth2 authentication type is selected. OAuth Client Secret used for the authentication.
Tenant IDAny stringOnly used if OAuth2 authentication type is selected. OAuth Tenant ID used for the authentication.
ScopeAny stringOnly used if OAuth2 authentication type is selected. OAuth Scope used for the authentication.
Token URLValid URLOnly used if OAuth2 authentication type is selected. OAuth Token URL used for the authentication.
Grant typeAny stringOnly used if OAuth2 authentication type is selected. OAuth grant type used for the authentication.
Get only new mailtrue / false

If set to true, only unseen emails will be retrieved by the plugin. 

Only works on IMAP/s. Only IMAP/s protocol can set search criteria when retrieving mail.

Action to take after reading emailsMark as seen, Delete, Move to write folder

Defines what to do with an email after its read. 

Move to write folder only works on IMAP/s protocol.

Number of messagesAny integerNumber of emails to retrieve each poll cycle. Leave empty if all mail should be retrieved.
Read folderAny stringName of the directory from which to read emails.
Write folderAny stringDirectory to move the emails to after they are read (only used if the "Move to write folder" option is selected)
Email content formatTEXT, JSON, XML, DELIMITEDFormat of the content of the email
Delimiter between fields"Newline" or any characterDefines the delimiter between fields to use in the message (only used if the DELIMITED format is selected)
Delimiter between key and valueAny character or stringDefines the delimiter between the key and value of the message fields (only used if the DELIMITED format is selected)

Run interval in seconds

Any string

Polling interval in seconds (default is 300)

If the delimited format is selected, the delimiters need to be configured. 

For example. for the following email each line is a message field and the key and value pairs are divided by a colon and a <space>.

Image 2. Sample delimited email and its configuration in 1Gateway



See also