NextGen Knowledge Center

SMTP Sender

This destination connector sends an e-mail to a specified address (or list of addresses), through a given SMTP relay/host. Both implicit and explicit (STARTTLS) encryption modes are supported. The body can be either text or HTML. Custom headers and attachments can be added to the request as well.

Supported property groups:

ItemNameDefault ValueDescription
ASMTP Host The domain name or IP address of the SMTP server to use to send the e-mail messages. Note that sending e-mail to an SMTP server that is not expecting it may result in the IP of the machine running Mirth® Connect being added to the server's "denylist".

After filling out the necessary information below, use the Send Test Email button to send a sample e-mail to the To address, to verify that everything is working as intended.

BSMTP Port25The port number of the SMTP server to send the e-mail messages to. Generally, the default port of 25 is used.
COverride Local BindingNoSelect Yes to override the local address and port that the client socket will be bound to. Select No to use the default values of 0.0.0.0:0. A local port of zero (0) indicates that the OS should assign an ephemeral port automatically.

Note that if a specific (non-zero) local port is chosen, then after a socket is closed it is up to the underlying OS to release the port before the next socket creation, otherwise the bind attempt will fail.

DLocal Address0.0.0.0The local address that the client socket will be bound to, if Override Local Binding is enabled.
ELocal Port0The local port that the client socket will be bound to, if Override Local Binding is enabled.

Note that if a specific (non-zero) local port is chosen, then after a socket is closed it is up to the underlying OS to release the port before the next socket creation, otherwise the bind attempt will fail.

FSend Timeout (ms)5000The number of milliseconds for the SMTP socket connection timeout.
GEncryptionNoneDetermines what type of encryption to use for the connection.
  • None: No encryption will be used. Messages will be sent over the connection in plain text.
  • STARTTLS: The connection will begin as unencrypted, and then the SMTP client will manually upgrade the connection through a STARTTLS command.
  • SSL: The connection will be encrypted from the very beginning. Use this when the server expects a TLS handshake after a client connects.
HUse AuthenticationNoDetermines whether to use authentication when connecting to the SMTP server.
IUsername The username to authenticate with.
JPassword The password to authenticate with.
KTo The e-mail address to send to. Multiple addresses can be specified with commas.
LFrom The e-mail address to send the message from.
MSubject The subject line of the e-mail.
NCharset EncodingDefaultThe character set encoding to use when converting the body, or Default to use the default character set encoding of the JVM Mirth® Connect by NextGen Healthcare is running on.
OHTML BodyNoDetermines the MIME type of the message, either text/plain or text/html. If HTML is used, richer message formatting may be used.
PTemplate The actual body of the e-mail. Velocity Variable Replacement is supported here.
QHeaders 
  • Use Table: The table below will be used to populate headers.
  • Use Map: The Java map specified by the following variable will be used to populate headers. The map must have String keys and either String or List<String> values.

When using the Use Table option above, entries in this table will be included as SMTP headers in the e-mail dispatch.

RAttachments 
  • Use Table: The table below will be used to populate attachments.
  • Use List: The Java list specified by the following variable will be used to populate attachments. The List must have AttachmentEntry values. The AttachmentEntry class is available in JavaScript scripts and is documented in The User API (Javadoc).

When using the Use Table option above, entries in this table will be added as attachments with the e-mail. The following columns are configurable:

  • Name: The name of the attachment.
  • Content: The Base64-encoded content of the attachment. You can also use a message attachment replacement token here.
  • MIME Type: The MIME type of the attachment (e.g. "image/png").