On-send send mode (ONSEND_SEND_MODE)

This article is only applicable for Microsoft 365 users. Please make sure that the appropiate authentication type is set. Else, see this article first.

When enabled, Nextcloud for Outlook runs the configured checks before an email is sent: attachments over your size threshold, the "Ask every time" setting, and enforced Secure Mail. On Microsoft 365 deployments with silent sign-in, these checks run through Outlook's Smart Alerts. ONSEND_SEND_MODE decides what Outlook does when the add-in cannot complete a check. It does not change what happens when a check completes.

Who this applies to

  • MS_AUTH_TYPE=naa_silent: the setting applies. Default is Block.

  • MS_AUTH_TYPE=naa or legacy_exchange: the setting has no effect. These deployments use the previous before-send model.

What the modes change

Situation

Block (default)

SoftBlock

The add-in cannot be loaded, for example the add-in server is unreachable

Not sent. Outlook asks the user to try later

Outlook asks the user whether to send anyway

The add-in loads but its check fails or does not finish within 10 seconds

Not sent. The alert says the check could not be completed

The add-in lets the send continue without a further prompt

What the modes do not change

A check that completes gives the same result in both modes:

  • Size-threshold mode, attachments over the threshold: the alert offers to share through Nextcloud or not to send.

  • "Ask every time" mode, any attachment: the alert also offers "Send anyway".

  • User not signed in to Nextcloud: the alert offers to sign in or to send anyway.

  • Enforced Secure Mail: the alert offers to apply Secure Mail or not to send. No "Send anyway".

So Block does not guarantee that every email goes through Nextcloud. A user in "Ask every time" mode, or a user who is not signed in, can send anyway. Use the size-threshold mode and enforced Secure Mail for conditions that must be met.

On Outlook versions that do not support the alert buttons (see Requirements), the alert shows the message with "Don't send" only, and an email that would have offered "Send anyway" is sent without an alert.

Which mode to choose

  • Choose Block when a failed check must stop the email. Users cannot send until the add-in is available again.

  • Choose SoftBlock when users should be able to send despite a check failure or an add-in outage. Such an email goes out unchecked, with its attachments.

How to set it

  1. In the docker-config/.env file of the deployment, set ONSEND_SEND_MODE=Block or ONSEND_SEND_MODE=SoftBlock.

  2. Recreate the add-in container, for example docker compose up -d --force-recreate sendent.outlook. A restart alone keeps the old mode.

  3. Download the manifest from https://<yourdomain>/manifest.xml and update the add-in in the Microsoft 365 admin center under Settings > Integrated apps. The send mode is part of the manifest, so Outlook keeps the old mode until the new manifest is deployed. Microsoft may take up to 24 to 72 hours to apply it.

How to verify

  • https://<yourdomain>/manifest.xml shows what the server generates: look for SendMode="Block" or SendMode="SoftBlock" on the OnMessageSend line. This does not show what Outlook currently uses.

  • After the manifest update has propagated, send a test email with an attachment over the threshold. The Smart Alerts dialog is titled "Message from Add-in: Nextcloud for Outlook". The older dialog does not have that title.

  • The difference between the two modes only shows when a check fails, so it cannot be seen in a normal send.

Requirements for Smart Alerts

Supported combinations, as documented by Microsoft:

  • Exchange Online: Outlook on the web, new Outlook for Windows, classic Outlook for Windows 2206 or later, Outlook for Mac 16.65 or later.

  • Exchange 2016 CU22, Exchange 2019 CU12 or later, Exchange Server Subscription Edition: classic Outlook for Windows 2206 or later only.

  • Volume-licensed Outlook 2021 does not support Smart Alerts. Keep those installs on naa or legacy_exchange.

  • The buttons in the alert, such as "Share with Nextcloud" and "Send anyway", need classic Outlook 2404 or later. On one Outlook 2021 Retail install the button was missing even so, and the alert pointed the user to the Share Files button on the ribbon. Test the Outlook versions your organisation uses before rolling out.


Was this article helpful?