Skip to main content

Inbound Email

Outgoing Description

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

Outgoing Prerequisites

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

Inbound Configuration

Field NameSupported ValuesDescription
Email serverAny stringEmail server to connect to
Email userAny valid email addressEmail address from which to obtain emails
PasswordAny stringPassword of the email user
Authentication typeBasic, OAuth2Type of authentication to use when connecting to the email server
Server typePOP3, IMAP, POP3 with SSL, IMAP with SSL/TLSProtocol 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 / falseIf 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 folderDefines what to do with an email after it's 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 secondsAny stringPolling interval in seconds (default is 300).

Outgoing Email

Outgoing Description

The email sender sends 1Gateway messages as email messages through SMTP. Supports attachments.

Outgoing Configuration

Field nameSupported valuesDescription
Email serverAny stringEmail session property. Email server to connect to
Port numberAny integerEmail session property. Port number
AuthenticateTrue / falseEmail session property. Defines if to authenticate when connecting to the email server with username and password.
Email userAny valid email addressEmail with which to log in to
PasswordAny stringPassword of the email user
Origin email addressAny valid email addressOrigin email address
Default destination email addressAny valid email addressDefault destination email for the message.*
ProtocolTLS, SSL, No encryptionEmail session property. Protocol used to send emails
Properties filenameValid filename(Advanced) If custom properties are needed to create email connection, define them in this file
Destination emailEmail addressIf the message doesn't contain a "destemail" field, the messages will be sent to this address

Advanced properties configuration

The properties file is used in cases where the fields in the configuration are insufficient. Define the properties filename and create a file with the desired properties. Example of a properties file:

Example of a properties file:

Email properties file

mail.smtp.host=smtp.example.com
mail.smtp.port=587
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.ssl.enable=false

The properties specified in the properties file will take precedence over those defined in the configuration. These fields include:

  • Email server (mail.smtp.host)
  • Port number (mail.smtp.port)
  • Authenticate (mail.smtp.auth)
  • Protocol (mail.smtp.starttls.enable, mail.smtp.ssl.enable)

Make sure to define these fields in the email properties file to ensure proper configuration.