PDF version of this page

Email/Fax

FormTrap Server offers two internal e-mailing methods in the left-hand column:

        SMTP (Simple Mail Transfer Protocol), including Office 365, Gmail and similar are common
        MAPI (Microsoft® Outlook/Exchange) is less commonly used

Faxing is also supported by two methods:

        Fax Server (Windows) is old and retained for any existing users
        e-Fax

The Email/Fax screen shows settings for Email and Fax parameters, grouped into sections with corresponding titles.  From release 20.18 parameters for Office 365, Gmail, Yahoo and other external TLS/SSL based server methods are included.

Email Settings

Top

Email


To configure SMTP Settings

For Office 365 (Microsoft 365), follow the Office 365 OAuth instructions below. For other SMTP servers, obtain these settings from your email administrator:

  • Host: Enter the SMTP server name.
  • Port: Enter the port supplied by your administrator. Common ports are 25 for internal SMTP, 587 for submission with STARTTLS, and 465 for implicit TLS.
  • Connection: Select the connection method required by the server. Use STARTTLS when instructed to upgrade the connection to TLS. Use plain text only where your administrator permits it.
  • Protocol: For an encrypted connection, select a supported TLS protocol. This setting does not apply to plain text connections.
  • Login: Select the authentication method required by the server. None applies only where authentication is not required. Select Auth login only for a server that supports password authentication. OAuth uses the XOAUTH2 login method.
  • User and Password: For password authentication, enter the SMTP account credentials. For Office 365 OAuth, the Password field holds the complete authentication text described below.
  • Default sender: Enter the email address that the account or application is authorized to send from.
  • Click Save and send a test email.

Office 365: configure SMTP with OAuth

These instructions apply to an organizational Microsoft 365 mailbox in the standard Microsoft 365 cloud. They require a FormTrap Server version that supports automatic Microsoft 365 OAuth authentication. Personal Outlook.com accounts and sovereign-cloud endpoints are not covered by this setup.

First ask your Microsoft 365 administrator to complete Office 365 administrator setup below. Obtain the tenant ID, application (client) ID, client secret value, authorized mailbox address, and the secret's expiry date.

  1. Open the Email/Fax screen and enter these SMTP settings:
    • Host: smtp.office365.com
    • Port: 587
    • Connection: STARTTLS
    • Protocol: TLS, with TLS 1.2 supported on the server. If individual TLS versions are offered, select TLS 1.2.
    • Login: Select XOAUTH2 (OAuth authentication) explicitly. Automatic login selection does not select OAuth.
    • User: Enter the authorized mailbox's full email address, for example sender@contoso.com.
    • Default sender: Use the same address unless your administrator has authorized another sender.
  2. Build the authentication text using the format below and paste the entire text into the Password field as one continuous line.
  3. Click Save, then send a test email and check delivery.

Password field format

oauth2:m365:v1|TENANT-ID|CLIENT-ID|CLIENT-SECRET-VALUE

Replace TENANT-ID and CLIENT-ID with the administrator's GUID values, retaining their hyphens. Replace CLIENT-SECRET-VALUE with the secret's value. Keep the prefix exactly as shown, including lowercase letters, and keep the three vertical-bar separators (|). Do not add quotation marks or line breaks. This field contains the authentication text, not the mailbox password, secret ID, or a manually obtained access token.

In the secret value only, replace a literal | with %7C and a literal % with %25. Leave other printable ASCII characters unchanged; + means a literal plus sign. Non-ASCII characters must be encoded as percent-escaped UTF-8 bytes. Do not encode the three separators or the complete authentication text.

Example using dummy IDs and the dummy secret abc|def%ghi+:

oauth2:m365:v1|11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|abc%7Cdef%25ghi+

FormTrap Server obtains and renews access tokens automatically while running as an unattended Windows service. No user needs to remain logged in. The client secret still expires: obtain a replacement from your administrator and update the Password field before that date. Protect the entire authentication text as a password.

Microsoft's SMTP submission settings describe the connection requirements.

Office 365 administrator setup

A Microsoft 365 administrator performs this setup outside FormTrap Server. Use an account with permission to register applications, grant administrator consent and manage Exchange Online. This setup uses an application and a client secret; a mailbox password is not required.

1. Register the application

  1. Sign in to the Microsoft Entra admin center for the mailbox's tenant. Open App registrations and select New registration.
  2. Enter a descriptive name, such as FormTrap SMTP. Select Accounts in this organizational directory only. No redirect URI is required for this unattended flow. Register the application.
  3. From its overview, record the Directory (tenant) ID and Application (client) ID.

See Microsoft's application registration instructions.

2. Create a client secret

  1. In the application, open Certificates & secrets, select Client secrets, then New client secret.
  2. Choose a description and expiry date, then add the secret.
  3. Immediately copy the secret's Value, not its Secret ID. Store it securely and record its expiry date and renewal owner. The value cannot be viewed again after leaving the page.

This FormTrap setup uses a client secret. See Microsoft's credential management instructions.

3. Grant SMTP application permission and mailbox access

Under API permissions, select Add a permission, APIs my organization uses, Office 365 Exchange Online, Application permissions, then SMTP.SendAsApp. Add the permission and grant administrator consent for the tenant. Microsoft Graph mail permissions and delegated SMTP permissions do not replace this application permission.

In Enterprise applications, open the application and copy its Object ID. This is the enterprise application's object ID, not the object ID shown under App registrations.

In PowerShell, install the Exchange Online module if needed, then connect as an Exchange administrator. Replace every placeholder below. Run New-ServicePrincipal only if the application has not already been registered in Exchange Online.

Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -Organization '<tenant-id>'

New-ServicePrincipal -AppId '<client-id>' -ObjectId '<enterprise-application-object-id>'
$smtpApp = Get-ServicePrincipal -Identity '<client-id>'
Add-MailboxPermission -Identity 'sender@contoso.com' -User $smtpApp.Identity -AccessRights FullAccess
Add-RecipientPermission -Identity 'sender@contoso.com' -Trustee $smtpApp.Identity -AccessRights SendAs

Grant access only to the mailbox intended for FormTrap email. If a different sender address is needed, authorize that sender separately. Follow Microsoft's SMTP OAuth setup, service principal instructions and SendAs permission reference.

4. Enable SMTP AUTH for the mailbox

Check the current settings and, where organizational policy permits, enable SMTP AUTH for the designated mailbox:

Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
Get-CASMailbox -Identity 'sender@contoso.com' | Format-List SmtpClientAuthenticationDisabled
Set-CASMailbox -Identity 'sender@contoso.com' -SmtpClientAuthenticationDisabled $false

A mailbox value of False enables SMTP AUTH; True disables it; a blank value inherits the organization setting. The mailbox setting overrides the organization setting. Microsoft Entra Security Defaults disables SMTP AUTH. If enabled, the tenant security administrator must review and approve the necessary policy changes before this method can be used. See Microsoft's SMTP AUTH configuration instructions.

5. Hand over the settings and verify operation

  • Securely provide the FormTrap operator with the tenant ID, client ID, client secret value, authorized mailbox and sender addresses, and secret expiry date.
  • Allow outbound access from the FormTrap service host to smtp.office365.com on TCP port 587 and login.microsoftonline.com on HTTPS port 443. Ensure TLS 1.2 and certificate trust work under the Windows service account. If a proxy is required, configure machine WinHTTP proxy settings; a browser's proxy settings alone are not sufficient.
  • Test email delivery while no user is logged in, after restarting the service, and again after access-token renewal.
  • Before the client secret expires, create a replacement and update FormTrap's Password field. Verify delivery before retiring the previous secret.

If authentication fails: Check the saved authentication text, selected XOAUTH2 login method, IDs, secret value and expiry, consent, enterprise application object ID, mailbox permissions and SMTP AUTH policy. For connection failures, check host, port, STARTTLS, TLS and service-account network access. Retain the error message or SMTP response for diagnosis, but do not include the Password field, client secret or access tokens in support requests.

Back to SMTP Settings

To configure Outlook/Exchange (MAPI) settings:

Outlook/Exchange (MAPI) is uncommon.  When used, profile information must be available to FormTrap Server. The profile name is mandatory, password optional and required only if the profile is password-protected (these prompts are bottom right of screen).

  • Logon Profile: - Select the appropriate email profile from the list. No profile listed means there is no MAPI profile configured. Create and configure a profile on that machine before continuing.
  • Password: - Enter the password for that profile.
  • Click the Save button.

Top

Fax Server

To configure the (Windows) Fax Server:

If the Fax Server is on another machine, specify in Fax server, Machine name the network machine name – for example \\faxserver (and leave this empty if the fax server is on the same machine as the FormTrap Server).

When using a remote fax server you may be required to change Fax Server’s folder. This is rare case and is usually caused by having insufficient privileges to write into Fax Server’s temp directory.

Top

E-Fax

To configure e-Fax:

This sends your fax document by email to your e-Fax provider. Supply your Provider Domain Name.

Click the Save button.

Top