Mail Distribution Service
Local SMTP vs Local Distribution vs Cloud Distribution
Local SMTP
The local SMTP service should be used in environments where the client has their own internal SMTP relay.
It should be noted that the local SMTP service cannot attempt retries of sends if it initially fails, however, this typically only occurs on edge cases.
Local Distribution
The local distribution service should be used where a client has their own internal SMTP relay, but desires additional confirmation and retention in the case of failures.
Note that while this can be done if the clients internal security allows it, using the cloud hosted distribution is a far simpler solution.
Cloud Distribution
The cloud distribution service should be used in environments where the client does not have an internal SMTP server and needs to send emails. This an be configured to use the secure KeyMark SMTP relay, which has been tooled to be compatible with the distribution server.
Setup
Local SMTP
On any FiM 20+ install the local SMTP distribution will already be included, any other versions will need to update.
To install the local SMTP distribution update, run the newest FormsInMotion server and client installers which can be found in
\\km-ftp\FTP\Download\FormsinMotion\Install\
It is recommended that the port setting be changed to 0 so that the mail service can automatically obtain its secure connection.
Local Site Settings
Note: do not create the the
DistributionServerPath
variable, if you wish to use the local distribution method.
Setting | Description | Example |
---|---|---|
SmtpFrom | The email that the smtp server will send the value with |
|
SmtpPassword | The password that the SMTP server will use to connect |
|
SmtpPort | The port that the SMTP server will use to connect. | value in range |
SmtpServer | The Smtp server that the mail distribution API will connect to. |
|
SmtpSsl | whether or not the message should be use the Secure Socket Layer protocol. Setting this to |
|
SmtpUser | the username that will be used to authenticate with the email account |
|
Local Distribution
Installing The .NET Core Compatibility Pack
The Distribution API uses Microsoft's modern web API toolkit, ASP.NET Core v3.1. Unfortunately, this is not supported natively by IIS v11, so a compatibility pack must be installed.
The compatibility pack can be download from this page or downloaded directly from this link
Adding The Distribution API to IIS
Note: Should only be performed by KeyMark Employees*
When the .NET Core compatibility pack has been installed in IIS, simply drag the installation files in to the desired folder in IIS, and convert the folder to an application. Ensure the application has been mapped to the desired URL. To get installation files pull FormsInMotion.MailDistribution Branch Master and build.
Verifying Your Distribution API Installation
When the API has been converted to an application, and the URL is mapped the installation can be verified by navigating to
{clientUrl}/Documentation/
.Map the URL by selecting the application, then clicking on "bindings" on the right hand side.
If your server has been setup correctly, you should see a list of API endpoints with their documentation.
Configuration
Mail Distribution is configured in the appsettings.json file, found in the mail distribution install location.
Distribution: General settings for the distribution service
RetryFactors: is how long the mail distribution will wait (in minutes) between each attempt to resend a failed message.
Note that this should always contain one less entry than the MaxSendAttempts as the first attempt will always be instant.
Purge: General settings for the purge service
PurgePeriodInHour: Number of hours that a successfully sent email will be retained before getting purged.
MaxFailedMessages: how many failed messages can be in the distribution service at any given time. After failed messages pass this number, the oldest failed messages will begin to be deleted, keeping the number of failed messages within the MaxFailedMessages.Utilizing the Local/Cloud Distribution Server
To enable the FormsInMotion Server to send to a distribution server, simply add a site property called
DistributionServerPath
and enter the URL for the distribution API.FiM Cloud hosted path:
https://maildistribution.app.formsinmotion.com
To disable this functionality, simply clear the URL, leaving the property blank.
Setting | Description | Example |
---|---|---|
DistributionServerPath | The path to the distribution API |
|
SmtpFrom | The email address that the smtp server will use to send the email |
|
SmtpPassword | The password that the SMTP server will use to connect |
|
SmtpPort | The port that the SMTP server will use to connect. | value in range |
SmtpServer | The Smtp server that the mail distribution API will connect to. |
|
SmtpSsl | whether or not the message should be use the Secure Socket Layer protocol. Setting this to |
|
SmtpUser | the username that will be used to authenticate with the smtp account |
|
SmtpFailureAddress | The administrator email(s) that will be used to send out notifications if an email fails to send. Delimiter for multiple emails is “;” | austin.w.graham@formsinmotion.com |
SmtpFailureServer (optional) | When sending notification of failure the Mail Distribution defaults to sending to the KM SMTP relay however this can be configured here. | forms-in-motion-no-reply@formsinmotion.com |
SmtpFailurePort (optional) | defaults to 0 but can be configured here if needed. | 0 |
SmtpFailureUsername (optional) | Username used to authenticate with the SmtpFailureServer provided | myfailureusername |
SmtpFailurePassword (optional) | Password used to authenticate with the SmtpFailureServer provided | myfailurepassword |
Miscellaneous
Hosted API can be view maildistribution.sandbox.formsinmotion.com/index.html
Cloud distribution installer built from FormsInMotion.MailDistribution - Master