Skip to content

Email notifications

Virto Commerce allows to send email notifications. To use this functionality the notification settings should be configured propertly.

How to configure email notifications

Gmail.com

If use gmail.com then need to do:

  1. Turn on Allow less secure apps here: https://www.google.com/settings/security/lesssecureapps
  2. Set Gateway is Smtp in Notifications options in Appsettings.json or Notifications:Gateway in Azure
  3. Then customize Smtp options:
    1. Fill SmtpServer smtp.gmail.com and Port 587
    2. Turn ON SSL: EnableSsl set true
    3. Set Login and Password
    4. like this in appsttings.json:
      "Smtp": {
          "SmtpServer": "smtp.gmail.com",
          "Port": 587,
          "EnableSsl": true,
          "Login": "test@test.com",
          "Password": "qwerty"
      }
      
    5. or in Azure:
      • Notifications:Smtp:SmtpServer set smtp.gmail.com
      • Notifications:Smtp:Port set 587
      • Notifications:Smtp:EnableSsl set true
      • Notifications:Smtp:Login set test@test.com
      • Notifications:Smtp:Password set qwerty

Sendgrid SMTP

If use another SMTP server like sendgrid.net then need to do:

  1. Set Gateway is Smtp in Notifications options in Appsettings.json or Notifications:Gateway in Azure
  2. Then customize Smtp options:
    1. Fill SmtpServer smtp.gmail.com and Port 587
    2. Turn OFF SSL: EnableSsl set false

      NOTE: should read prerequiments in the SMTP server site and read the article

    3. Set Login and Password like this in appsttings.json: json "Smtp": { "SmtpServer": "smtp.sendgrid.net", "Port": 25, "EnableSsl": false, "Login": "test@sendgrid.net", "Password": "qwerty" }

SendGrid's API

  1. Set Gateway is SendGrid Notifications options in Appsettings.json or Azure
  2. Then fill apikey in SendGrid options
    • looks like this in appsetting.json:
          "SendGrid": {
              "ApiKey": "testapikey"
          }
      
    • or in Azure:
      * Notifications:SendGrid:ApiKey set testapikey

Note

Also you could check the emailing-services in IntegrationTests here


Last update: April 20, 2022