HomeGuidesRecipesAPI
HomeGuidesAPILog In

SMTP Configuration

To configure SMTP in SmartIQ, you need to make the modifications in Manage, Produce and/or Scheduler configuration files.

📘

Upgrade

If upgrading from SmartIQ version 12 or older, the system will automatically copy the web.config settings to the appsettings.json file and no further actions need to be done.

On-premise/Hosted Environments

For on-premise, manually change the settings on the appsettings.json file on the Produce folder. For private, hosted environments, contact SmartIQ support with the SMTP settings that have to be changed.

Configuring SMTP settings

  1. Go to the Produce folder and open the appsettings.json file.
  2. Search for the SMTP string. You should see the following default settings if your environment has not made any changes to the SMTP settings.
"Smtp": {
  "DeliveryMethod": "Network",
  "Host": "127.0.0.1"
}
  1. Change any of the following settings and save the file.
"Smtp": {
        "DeliveryMethod": "SpecifiedPickupDirectory",
        "Host": "localhost",
        "Port": "25",
        "EnableSsl": "false",
        "Username": "<your SMTP username>",
        "Password": "<your SMTP password>",
        "PickupDirectoryLocation": "c:\\temp\\mails",
         "UseDefaultCredentials": "true"
    },

SendGrid Settings

SMTP settings for SendGrid are also in the appsettings.json file.

"Smtp": {
        "DeliveryMethod": "Network",
        "Host": "smtp.sendgrid.net",
        "Port": "587",
        "Username": "<your SMTP username>",
        "Password": "<your SMTP password>"
    },

👍

Best Practice

If you are using SendGrid, use the API Key method to send SMTP where the username will be "apikey" and the password will be the generated API Key from SendGrid.

Scheduler

Open the appsettings.json file present in the SmartIQ Scheduler folder and follow the steps above.

Multi-Tenant Cloud Environments

For those using multi-tenant cloud environments, configure the SMTP settings from the Manage dashboard.

  1. Go to Manage > Settings > SMTP.

  2. Enable the Custom SMTP Server option.

  3. Provide the SMTP Host name and Port.

  4. (Optional) Enable TSL (Transport Layer Security) for more secure connection which can work with the TLS and SSL (Secure Socket Layer) encryption protocols.

  5. Select Authentication Type, either SMTP Auth or OAuth 2.0:

    • SMTP Auth – Authentication protocol where you need to provide the user name and password.
    • OAuth 2.0 – Authorization protocol where you need to provide the following (currently only Password Flow is supported):
      • Client ID – The client ID you received when you first created the application.
      • Client Secret – The client secret you received when you first created the application. The client secret MUST be kept confidential.
      • Scope – The values indicating which parts of the user's account to access.
      • Token URL – Indicates the URI to return the user to after authorization is complete.
      • User name and;
      • Password
  6. Click Save.