Sending email
Nova sends notifications and sign-in codes over SMTP. Sending is set up under “Administration” → “Notifications” → “Channels”. If no host is entered there, the NOVA_SMTP_* variables apply, see Configuration.
Two settings combine freely:
| Setting | Options |
|---|---|
| Connection path | “Direct”: Nova connects to the mail server itself. “SAP Cloud Connector”: Nova runs on SAP BTP and reaches a mail server in the organisation's network. |
| Sign-in | “Username and password”; with an empty username Nova does not sign in. “Microsoft 365 (OAuth)”: Nova signs in with a token of an app registration in Microsoft Entra ID, without the password of a mailbox. |
“Send test email” sends a message to your own address with the saved settings, even while sending is paused. If sending fails, Nova shows the answer of the mail server or of Microsoft.
Mail server in the organisation's network through the Cloud Connector
When Nova runs on SAP BTP (see SAP BTP, Cloud Foundry), it reaches a mail server in the organisation's network through the Cloud Connector. Nothing is opened to the internet for this, and internal mail servers often accept mail from their own network without sign-in.
- Cloud Connector: map the mail server with protocol TCP to a virtual host, usually port 25 or 587. With STARTTLS or SSL, Nova checks the certificate against the virtual host's name; simplest is a virtual host named like the mail server.
- Mail server: accept and relay mail from the Cloud Connector's machine for Nova's from address.
- In Nova: set “Connection path” to “SAP Cloud Connector”; “Host” and “Port” are the virtual host and port from the Cloud Connector. If the mail server accepts mail without sign-in, leave the username empty. The “Cloud Connector location ID” is only needed when several Cloud Connectors are attached to the subaccount.
If Nova is bound to no Connectivity service, sending fails with a message; Nova then does not connect directly.
Microsoft 365 with OAuth
Nova keeps sending over SMTP but signs in with the token of an app registration (SMTP AUTH with XOAUTH2).
App registration in Microsoft Entra ID: create it and a client secret. Under “API permissions” → “APIs my organization uses” → “Office 365 Exchange Online”, add the application permission
SMTP.SendAsAppand grant admin consent.Exchange Online (PowerShell, Exchange administrator): register the app's service principal and give it the mailbox Nova sends from. The object ID is the enterprise application's, not the app registration's.
powershellNew-ServicePrincipal -AppId <client ID> -ObjectId <object ID of the enterprise application> Add-MailboxPermission -Identity <mailbox> -User <object ID of the enterprise application> -AccessRights FullAccessSMTP AUTH: allow it for the mailbox; the mailbox setting applies even when SMTP AUTH is switched off for the tenant:
powershellSet-CASMailbox -Identity <mailbox> -SmtpClientAuthenticationDisabled $falseIn Nova: “Host”
smtp.office365.com, “Port” 587, STARTTLS on; “Sign-in” set to “Microsoft 365 (OAuth)”; tenant ID, client ID and client secret of the app. “Mailbox” is the mailbox from step 2; if empty, Nova uses the from address.
Common messages in the test:
| Message | Cause |
|---|---|
535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled … | SMTP AUTH is not allowed for the mailbox, step 3 |
535 5.7.3 Authentication unsuccessful | service principal missing or without right on the mailbox, step 2, or the permission SMTP.SendAsApp without consent, step 1 |
Microsoft 365 token request refused: … AADSTS7000215 … | client secret wrong or expired |
Microsoft 365 token request refused: … AADSTS700016 … | client ID unknown in the tenant |
Permission changes in Exchange Online often take a while to apply; a test right afterwards may still fail.