Skip to content
Last update: February 1, 2024

Configuration

This section explains the basic configuration for the Notifications module via the appsettings.json file

Node Default or Sample Value Description
Gateway "Smtp"
"SendGrid"
The current notification sending gateway.
The out-of-the-box implemented and
supported values are Smtp, SendGrid.
DefaultSender "[email protected]" This required setting provides sender
identification used by the current notification sending gateway.
Smtp SMTP gateway configuration.
Used if the Gateway setting has the Smtp value.
Smtp:SmtpServer "smtp.gmail.com" The SMTP server address for sending emails.
Smtp:Port 587 The port number to use when connecting to the SMTP server.
Smtp:Login The login (username) for authenticating to the SMTP server.
Smtp:Password The password for authenticating to the SMTP server.
Smtp:ForceSslTls false If set to true, forces the usage of SSL/TLS when connecting to the SMTP server.
SendGrid SendGrid gateway configuration.
Used when the Gateway setting has the SendGrid value.
SendGrid:ApiKey The API key for authenticating to the SendGrid service.
Notifications:DiscoveryPath Templates Relative folder path in the local file system
that will be used to discover notification template files
during notification rendering.
Notifications:FallbackDiscoveryPath Alternative relative folder path in the local file
system that will be used to discover alternative template
files during notification rendering.
Templates found through this path will be used as a backup,
in case the templates defined in the
Notifications:DiscoveryPath setting are not found.

Example

appsettings.json
"Notifications": {
    "Gateway": "Smtp",
    "DefaultSender": "[email protected]",
    "Smtp": {
      "SmtpServer": "smtp.gmail.com",
      "Port": 587,
      "Login": "",
      "Password": "",
      "ForceSslTls": false
    },
    "SendGrid": {
      "ApiKey": ""
    },
    "Notifications:DiscoveryPath": "Templates",
    "Notifications:FallbackDiscoveryPath": ""
}