Skip to content

SMTP Server

This setup screen defines the SMTP servers IMan uses for outbound mail.

The audit and the Email task use the mail server to send mail.

No SMTP server, no Audit Report

IMan cannot send an integration's Audit Report until you define an SMTP server.

Setup > SMTP Servers

The Details of ORDERS dialog for a saved SMTP mail server: an Email Type of Smtp (Username), the server address smtp.example.com, a Protocol Type of TLS, port 587, the username orders@example.com, and a Password box holding eight asterisks and the characters a55, with an eye button beside it. TEST and AUTHORISE buttons sit below. The Smtp Server Results pane on the right is empty until you press TEST

ID

The unique Id of the SMTP Server.

Description

A useful description of the SMTP Server.

Email Type

The Email Type decides which service IMan sends email through. The grid's Server Type column shows this choice. IMan supports three types:

  • SMTP Server Types
    • Sends email to a designated SMTP server.
  • Realisable SMTP Service
    • Sends email through the Realisable email service.
    • All emails sent through this service use one of Realisable's email domains. The service is not suitable when the sender must be an address in your organisation's domain.
    • The service is limited to 10 emails per day. If you need to send more, use a regular SMTP service, or Office 365 where applicable.
  • Office 365 SMTP Server
    • Sends email through Office 365. You must first configure an app in Office 365. See Azure App Configuration for details.

Retry Settings

The retry settings below the Email Type's own settings decide how IMan handles a send that fails for a reason that may pass, such as a server that is briefly unreachable or busy. They apply to all three Email Types.

The retry settings on the SMTP Server form: Custom retry settings unticked, and greyed beneath it Retries 3, First delay (seconds) 5 and Maximum delay (seconds) 30

Custom retry settings decides where the values come from. Unticked, IMan uses its defaults for an SMTP server, shown greyed in the boxes. A later release that improves the defaults changes an unticked record too. Tick it to edit the boxes and keep your own values on this record.

  • Retries: how many times IMan retries a failed call before it reports the error, from 0 to 5. 0 turns these retries off.
  • First delay (seconds): the wait before the first retry, from 1 to 60.
  • Maximum delay (seconds): the longest wait between retries, from 1 to
  • It cannot be less than the first delay.

Each wait is double the one before, up to the maximum delay. IMan varies every wait by up to a quarter either way. That keeps many callers from retrying in step.

The defaults for an SMTP server are 3 retries, a first delay of 5 seconds and a maximum delay of 30 seconds. The waits are then about 5, 10 and 20 seconds.

What IMan retries

IMan retries the connection and the send when:

  • it cannot connect to the server, or the connection times out or drops;
  • the server does not complete its greeting or the switch to TLS;
  • the server answers with a temporary refusal, a 4xx reply such as 421 or 451.

IMan never retries:

  • a rejected login;
  • a permanent refusal, a 5xx reply such as 550 for an unknown mailbox;
  • a server certificate that fails validation;
  • a sender or recipient the server will not accept.

IMan never sends a message twice. Once the server has started to receive the message body, a dropped connection may have left the message delivered, and IMan does not send it again. The error says so: The connection to the SMTP server [smtp.example.com] failed after the message body had started to be sent, so the message may have been delivered. It has not been sent again. A 4xx reply after the body is still a refusal, and IMan retries it.

The Realisable SMTP Service type retries only when IMan cannot reach the relay at all. Once the relay has the message, IMan does not send it again.

The Office 365 type fetches an access token before each attempt. The token request has fixed retries of its own: 3, after about 1, 2 and 4 seconds, when the token service is throttling or failing. They apply whatever Retries says.

What you see

When a retry succeeds, the run carries on as if nothing had failed. Each retry writes a line to the Email task's trace:

Attempt [1] of [4] failed; retrying in [4.8] s. <the error>

When the retries run out, IMan reports the last error with the count added, such as (after [3] retries), and the usual error handling applies. From then on, each call on the same task's connection gets one attempt and no retries until a call succeeds. A server that is down then fails the remaining work quickly, rather than holding up every record for the full retry time.

IMan makes no retries in the Designer. A preview, or Test on this screen, reports the first failure at once.

IMan also sends its audit report emails through an SMTP server. If a report email fails after a successful run, IMan logs The audit report for job [DAILYORDERS] could not be sent. with the reason, and the run stays successful.