Email Listener
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 type | Basic, OAuth2 | Type 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 ID | Any string | Only used if OAuth2 authentication type is selected. OAuth Client ID used for the authentication. |
OAuth Client Secret | Any string | Only used if OAuth2 authentication type is selected. OAuth Client Secret used for the authentication. |
Tenant ID | Any string | Only used if OAuth2 authentication type is selected. OAuth Tenant ID used for the authentication. |
Scope | Any string | Only used if OAuth2 authentication type is selected. OAuth Scope used for the authentication. |
Token URL | Valid URL | Only used if OAuth2 authentication type is selected. OAuth Token URL used for the authentication. |
Grant type | Any string | Only used if OAuth2 authentication type is selected. OAuth grant type used for the authentication. |
Get only new mail | true / 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 emails | Mark 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 messages | Any integer | Number of emails to retrieve each poll cycle. Leave empty if all mail should be retrieved. |
Read folder | Any string | Name of the directory from which to read emails. |
Write folder | Any string | Directory to move the emails to after they are read (only used if the "Move to write folder" option is selected) |
Email content format | TEXT, JSON, XML, DELIMITED | Format of the content of the email |
Delimiter between fields | "Newline" or any character | Defines the delimiter between fields to use in the message (only used if the DELIMITED format is selected) |
Delimiter between key and value | Any character or string | Defines 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