Email configuration

Email configuration determines how Strivacity sends customer notifications.

Strivacity supports the following email provider types:

  • Strivacity: Uses the Strivacity-managed email service.
  • SMTP: Sends email through an SMTP server that you configure.
  • Custom: Uses custom JavaScript to integrate with an API-based email service.
📘

Only one email provider can be active at a time.

View email providers

  1. In the Admin Console, go to Instance configurationEmail configuration.
  2. The provider list shows the configured email providers and indicates which provider is currently active.
  3. To add an email provider, select Add configuration.
📘

The Strivacity email provider is available by default and does not require additional configuration.

Add an SMTP provider

  1. Select Add configuration.
  2. Select SMTP.
  3. Configure the following settings:
    1. Name: Enter a name for the provider.
    2. Description: Optionally describe the provider.
    3. Custom sender domain: Optionally specify a sender domain. Leave this field empty to use the domain of the application associated with the email.
    4. Connection type: Select the connection type used by the SMTP server.
    5. Server address: Enter the address of the SMTP server.
    6. Server port: Enter the port used by the SMTP server.
    7. Username: Enter the username Strivacity will use to authenticate with the SMTP server.
    8. Password: Enter the password associated with the SMTP username.
  4. Select Save.

Add a custom email provider

A custom email provider lets you integrate Strivacity with an API-based email delivery service using JavaScript.

  1. Select Add configuration.
  2. Select Custom provider configuration.
  3. Enter a Name and, optionally, a Description.
  4. Select Create.
  5. Optionally configure a Custom sender domain. Leave this field empty to use the domain of the application associated with the email.
  6. Implement the email delivery logic in the code editor.
  7. Select Save.

The code editor provides a function template for implementing the custom email provider. Use the provided objects to build the request sent to your external email service and return the delivery result to Strivacity.

The custom email provider function receives the following data:

ObjectData provided
customerCustomer ID and identity store
messageTarget email address, rendered subject, HTML body, plaintext body, sender, and template variables
applicationApplication ID and client ID
notificationNotification event ID and template type
parametersVariables and secrets assigned to the custom provider

The function must return a CustomEmailProviderResponse using the callback.

The response can include:

  • sent: Indicates whether the message was sent.
  • providerMessageId: Identifier returned by the external email provider, if available.
  • errorReason: Reason the delivery failed, if applicable.

Example:

module.exports = function (
  { customer, message, application, notification, parameters },
  callback
) {
  // Implement your email delivery logic here.

  callback(new CustomEmailProviderResponse(true, ""));
};

Activate an email provider

To use a configured provider for email delivery, open the provider and select Activate as email provider.

Only one email provider can be active at a time.

⚠️

The active email provider cannot be deleted. Activate a different provider before deleting it.


Did this page help you?