Skip to content
Last update: May 8, 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 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 The SMTP server address for sending emails.
Smtp:Port 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 true
false
If 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 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": ""
}