SMTP

Module for outbound SMTP messages

Introduction

Platform module for application outbound SMTP requests.

Multiple instances of the module can be configured to support outbound request with different properties, like timeouts, proxies or SSL/TLS settings.

Callers targets the requested instance by its name which must be configuration unique.

Messages kan be sent in plain text or HTML format.

Configuration

Module name: SmtpClient

Name
Description
Default value
Mandatory

name

Destination name. Unique identifier for a specific configuration/connection/service. This value must be unique for all smtpclient configurations.

"default"

host

SMTP server host.

N/A

port

SMTP server port.

N/A

from

Who is the message from.

"noreply@fortifiedid.se"

user_name

User name when identifying against SMTP server.

N/A

password

Used when authenticating against SMTP server.

N/A

start_tls

Defines if communications must use TLS. Allowed values are : "OPTIONAL", "DISABLED" or "REQUIRED"

"OPTIONAL"

keep_alive

Should a pool be used keeping connections open.

true

reconnect_interval

value for reconnect interval in ms.

1000

keep_alive_timeout

This value determines how long a connection remains unused, in seconds, in the pool before being evicted and closed.

600

connect_timeout

How many milliseconds before a connect attempt fails.

5000

disable_esmtp

set if ESMTP should be tried as first command (EHLO), rfc 1896

true

idle_timeout

Timeout in seconds.

600

login

possible options for a login into a SMTP server either "DISABLED", "NONE", "REQUIRED" or "XOAUTH2"

"NONE"

reconnect_attempts

Number of reconnect attempts.

3

use_alpn

Whether to use or not Application-Layer Protocol Negotiation.

false

ssl_trust_all

Ignore SSL validation.

false

ssl_handshake_timeout

the SSL handshake timeout in ms.

10

use_ssl

is SSL/TLS enabled.

false

proxy_host

Host for proxying.

N/A

proxy_port

Port for proxying.

N/A

proxy_user

N/A

proxy_password

N/A

auth_methods

Authentication methods supported by the SMTP server. The following are supported: "XOAUTH2, DIGEST-MD5, CRAM-SHA256, CRAM-SHA1, CRAM-MD5, PLAIN, LOGIN". Use "" if you are unsure of which auth methods are supported.

"XOAUTH2, DIGEST-MD5, CRAM-SHA256, CRAM-SHA1, CRAM-MD5, PLAIN, LOGIN"

Currently attachments are not supported

Metrics

This module produces metrics for each request.

name

fortified.internal.smtpclient_<metric-name>

tags

name=<instance-name>