Skip to main content
Version: On prem: 15.0.0

Setting up sending mails

You can configure to send emails defining the host name, port, TLS and authentication method.

The notificationSettings XML schema is available under the following path: <website root>/Schema/NotificationSettingsML.xsd.

Follow these steps to set up port and host name:

  1. Go to Setup > System settings > Configuration objects.

  2. Open the configuration object notificationSettings.

  3. Set up the port and host name in the XML schema:

    <?xml version="1.0" encoding="utf-8">
    <notificationSettings xmlns="http://schemas.omada.net/ois/2022/NotificationSettingsML">
              <smtp>  
                <network
                  host="mail.name-domain.com"
                  port="25"
                  secureSocketOptions="StartTlsWhenAvailable" >
  4. Optionally, you can change the SecureSocketOptions default security configuration StartTlsWhenAvailable to one of the following values:.

    • StartTlsWhenAvailable - this is the default configuration. It supports the SMTP Service Extension for Secure SMTP over Transport Layer Security as defined in RFC 3207. In this mode, the SMTP session begins on an unencrypted channel, then a STARTTLS command is issued by the client to the server to switch to secure communication using SSL.
    • None - no SSL or TLS encryption should be used.
    • Auto - allows the IMailService to decide which SSL or TLS options to use (default). If the server does not support SSL or TLS, then the connection will continue without any encryption.
    • SslOnConnect - an alternate connection method is where an SSL session is established up front before any protocol commands are sent. This connection method is sometimes called SMTP/SSL, SMTP over SSL, or SMTPS and by default uses port 465.
    • StartTls - elevates the connection to use TLS encryption immediately after reading the greeting and capabilities of the server.

Next, depending on the authentication type, the parameters needed will vary.

Anonymous authentication

This setup is for testing purposes only.

When connecting to the SMTP service, Omada Identity gets the capabilities of the SMTP service:

  • If the SMTP service supports anonymous authentication, then, Omada Identity authenticates using SASL anonymous authentication protocol.
  • If the SMTP service does not support authentication, then, Omada Identity doesn't attempt to authenticate with the SMTP service.
note

If you are using Exchange, follow Microsoft guidelines to configure Exchange for anonymous authentication.

<?xml version="1.0" encoding="utf-8">
<notificationSettings xmlns="http://schemas.omada.net/ois/2022/NotificationSettingsML">
    <smtp>  
       <network
          host="mail.name-domain.com"
          port="25"
       <anonymous 
          userName = ""/>
       </network>
    </smtp>    
</notificationSettings>

NTLM authentication

No parameter value is needed.

<?xml version="1.0" encoding="utf-8">
<notificationSettings xmlns="http://schemas.omada.net/ois/2022/NotificationSettingsML">
          <smtp>  
            <network
              host="mail.name-domain.com"
              port="25">
              <defaultCredentials />
            </network>
          </smtp>
</notificationSettings>

Basic authentication

The following parameters are needed:

  • userName - the user name associated with the credentials.
  • password - the password for the user name associated with the credentials.
<?xml version="1.0" encoding="utf-8">
<notificationSettings xmlns="http://schemas.omada.net/ois/2022/NotificationSettingsML">
  <smtp>
    <network
        host="mail.name-domain.com"
        port="25">
    <basic 
        userName="" 
        password="" />
    </network>
  </smtp>
</notificationSettings>

Azure AD authentication

This setup is only for Azure AD Password Grant. The following parameters are needed:

  • instance - specify an instance. If not, your app will target the Azure public cloud instance (the instance of URL https://login.onmicrosoftonline.com).
  • clientId - the Application (client) ID that the Azure portal - App registrations page assigned to your app.
  • tenantId - the directory tenant that you want to log the user into.
  • userName - the user name associated with the credentials.
  • password - the password for the user name associated with the credentials.
  • scopes - space-separated list of permissions, that the app requires.

For more detailed information, refer to the Microsoft documenation.

<?xml version="1.0" encoding="utf-8">
<notificationSettings xmlns="http://schemas.omada.net/ois/2022/NotificationSettingsML">
          <smtp>
            <network
              host="smtp.office365.com"
              port="587">
              <azureAdPasswordGrant
                instance="https://login.microsoftonline.com"
                clientId="7A83471E-A8C7-4C06-8120-77B9AA56FA04"
                tenantId="2487ABFA-47FC-4F60-8AF4-2B857B17432C"
                userName="example@megamart.onmicrosoft.com"
                password="xxx"
                scopes="https://outlook.office365.com/.default"
              />
            </network>
          </smtp>
</notificationSettings>