Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Email Settings connect FlexDeploy to your email server, allowing for outgoing email notifications and, if enabled, incoming reply processing for approval responses. If you are using OAuth with Microsoft Office 365 or wish to utilize the Graph API for your email provider, please refer Microsoft Office 365 Email with OAuth or Microsoft Office 365 Email with Graph API.

children
Table of Contents
minLevel
1
depthmaxLevel1
allChildrenoutlinetruefalse
stylenone
typesortAndReverselist
firstprintable0true

Outgoing Email Settings

...

Property

Description

Default Values

Auth Type

Authentication method for connecting to the outgoing email server. Typically, SMTP is used, but when OAuth is enabled, Microsoft Graph API is also supported.

Basic Auth

Host Name

Hostname for the outgoing email server.

mail.domain.com

Host Port

Port number for the outgoing email server.

25

User Name

Outgoing email authentication username. If using OAuth, this must match the user who completed the Authorize action for Microsoft Azure application on the System Settings - Integration Settings page.

Password

The outgoing email user's password. This is not required when using OAuth.

OAuth Application

OAuth application configured and authorized on the System Settings - Integration Settings.

From Address

Address from which all outbound emails are sent

noreply@domain.com

SMTP Enable STARTTLS

Enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

Reference - https://kunder.support/knowledgebase/400/SSL-vs-TLS-vs-STARTTLS.html

true

SMTP Properties

SMTP Server Properties. These are all the properties applied when connecting to your mail server. Depending on your mail server you may need to add more properties than the default below. With this field you have access to the follow variables to use in the SMTP Properties:

  • PROTOCOL - Set the value of protocol in your SMTP Properties and the value will replace all occurrences of ${{PROTOCOL}} in the SMTP Properties. Examples of protocol could be "smtp".

  • SMTP_HOST_NAME - Use the ${{SMTP_HOST_NAME}} syntax and the plaintext will get replaced with the value of the above SMTP Host Name field at runtime.

  • SMTP_HOST_PORT - Use the ${{SMTP_HOST_PORT}} syntax and the plaintext will get replaced with the value of the above SMTP Host Port field at runtime.

  • SMTP_ENABLE_TLS - Use the ${{SMTP_ENABLE_TLS}} syntax and the plaintext will get replaced with the value of the above SMTP Enable STARTTLS field at runtime.

Default SMTP Properties
Code Block
PROTOCOL=smtp
mail.${{PROTOCOL}}.host=${{SMTP_HOST_NAME}}
mail.${{PROTOCOL}}.port=${{SMTP_HOST_PORT}}
mail.${{PROTOCOL}}.starttls.enable=${{SMTP_ENABLE_TLS}}
mail.${{PROTOCOL}}.connectiontimeout=30000
mail.${{PROTOCOL}}.timeout=30000
mail.${{PROTOCOL}}.writetimeout=30000
mail.${{PROTOCOL}}.class=com.sun.mail.smtp.SMTPTransport
mail.${{PROTOCOL}}.ssl.protocols=TLSv1.2

PROTOCOL=smtp

...

Property

Description

Default Values

Enable Email Approval

Enable approvals by email reply. This requires the hostname/port and additional properties based on the authentication type.

false

Auth Type

Authentication method for connecting to the incoming email server. Typically, IMAP is used, but when OAuth is enabled, Microsoft Graph API is also supported.

Basic Auth

Host Name

Hostname for the incoming email server.

imap.domain.com

Port

Port number for the incoming email server.

993

User Name

Incoming email authentication username. If using OAuth, this must match the user who completed the Authorize action for Microsoft Azure application on the System Settings - Integration Settings page. Defaults to the incoming email username.

Password

The incoming email user's password. This is not required when using OAuth. Defaults to the incoming email password.

OAuth Application

OAuth application configured and authorized on the System Settings - Integration Settings. Leave blank to use the same app as outgoing email.

IMAP Enable STARTTLS

Enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

Reference - https://kunder.support/knowledgebase/400/SSL-vs-TLS-vs-STARTTLS.html

false

IMAP Properties

IMAP Server Properties. These are all the properties applied when connecting to your mail server. Depending on your mail server you may need to add more properties than the default below. With this field you have access to the follow variables to use in the IMAP Properties:

  • PROTOCOL - Set the value of protocol in your IMAP Properties and the value will replace all occurrences of ${{PROTOCOL}} in the IMAP Properties. Examples of protocol could be "imap" or "imaps".

  • IMAP_HOST_NAME - Use the ${{IMAP_HOST_NAME}} syntax and the plaintext will get replaced with the value of the above IMAP Host Name field at runtime.

  • IMAP_HOST_PORT - Use the ${{IMAP_HOST_PORT}} syntax and the plaintext will get replaced with the value of the above IMAP Host Port field at runtime.

  • IMAP_ENABLE_STARTTLS - Use the ${{IMAP_ENABLE_STARTTLS}} syntax and the plaintext will get replaced with the value of the above IMAP Enable STARTTLS field at runtime.

Default IMAP Properties
Code Block
languagetext
PROTOCOL=imap
mail.${{PROTOCOL}}.host=${{IMAP_HOST_NAME}}
mail.${{PROTOCOL}}.port=${{IMAP_HOST_PORT}}
mail.${{PROTOCOL}}.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.${{PROTOCOL}}.starttls.enable=${{IMAP_ENABLE_STARTTLS}}
mail.${{PROTOCOL}}.socketFactory.port=${{IMAP_HOST_PORT}}
#mail.${{PROTOCOL}}.socketFactory.fallback=false
#mail.${{PROTOCOL}}.ssl.enable=true
#mail.${{PROTOCOL}}.connectiontimeout=5000
#mail.${{PROTOCOL}}.timeout=5000

PROTOCOL=imap

Email Reply Folder

The email folder to process replies from. Defaults to INBOX if not specified.  All inbound emails will be sent to default inbox folder, but rules can generally be configured on mail servers to move them to other folders if desired.

Warning

Warning

All emails from the this folder will be deleted after processing.  Do not use an email account which is used for any other purpose since the emails will be deleted.

INBOX

Approval Reply Address

Return address for approval replies. Defaults to the outgoing email From Address.

Tip

Important

The emails are read and processed from this account, which must be a dedicated inbox and not used for any other purpose.   All emails from the Reply Email Folder in this account will be deleted after processing.  The connection is established to the mail server using the IMAP settings, and therefore, the IMAP user and the Approval Reply address must be linked.  It is possible to utilize an email group/distribution as the reply address, provided the IMAP User is a member of that group.

Email Reply Process Interval

Frequency in which FlexDeploy processes inbound messages from the Email .  Required if email approvals are enabled.  Default value is 5 minutes.

5

Email Reply Process Count

Number of email messages which are read and processed each interval.  The limit prevents Spam or DoS attacks from impacting the performance of the FlexDeploy server.  Required if email approvals are enabled.  Default value is 30 messages.

30

...

  • Are you using TLS?

    • If TLS, make sure STARTTLS is disabled and IMAP Properties contains the line for "starttls.enable". Match the version of TLS version used on your IMAP server with the imap property: e.g. "mail.${{PROTOCOL}}.ssl.protocols=TLSv1.2".

  • Can you connect to IMAP server outside of FlexDeploy server? Running the below command will test for this:

    • openssl s_client -crlf -connect {YOUR_IMAP_HOST}:{YOUR_IMAP_PORT}

  • Can you connect to IMAP server within FlexDeploy server? Running the below command will test for this:

    • tag login {YOUR_ACCOUNT_USERNAME} {YOUR_ACCOUNT_PASSWORD}

  • Are you using a SSL port?

...

Notes

  • Please make sure there are no extra special chars while copying SMTP or IMAP properties in the property box.

  • To run SMTP in debug mode set the Log level to finest .and logs can be found at catalina.out