Send Email

The email skill provides a quick way to send emails from within a Digital Agent workflow.

Creating Your Skill​

  1. From the Flow Editor view, click Insert Skill.

  2. Select Send Email.

The following interface allows you to insert the information you would fill in when using any standard email service:

  • From, To, CC & BCC: These fields are filled with email addresses.

    • From: sender's email address

    • To: recipient's email

    • CC (carbon copy): visible email addresses who receives a copy

    • BCC (blind carbon copy): invisible email addresses who receives a copy

  • Subject: subject of the email, a content element as the subject line.


Note:

Even if you use markdown in the subject line, it will render as plain text.

  • Email Content: content element, a message to be sent.


Note:

Unlike the subject field, you can use markdown, which Digital Agent will render correctly to the receiver. You can also include HTML to enhance the formatting of your email body further.


Digital Agent supports templating in all fields of your email skill, allowing access to variables stored in Memory. All bot, user, session, temp, and event are accessible via templating.

Configuring Email Skill​

To send an email using the email skill, you need to configure your chatbot with a transport connection string. Set the configuration string in the directory ...data/global/config/basic-skills.json. For more information on the mail transporters available and how to configure them.

You can edit those variables in Digital Agent from the Code Editor.


Example

{
  "$schema": "../../assets/modules/basic-skills/config.schema.json",
  "defaultContentElement": "builtin_single-choice",
  "defaultContentRenderer": "#builtin_single-choice",
  "defaultMaxAttempts": 3,
  "disableIntegrityCheck": true,
  "matchNumbers": true,
  "matchNLU": true,
  "transportConnectionString": {
    "host": "192.168.100.200",
    "port": "25",
    "secure": false,
    "tls": {
      "rejectUnauthorized": false
    }
  }
}

The transportConnectionString could be an object or a string.

  • String


 
  • Object Format


"transportConnectionString": {
    "host": "192.168.100.200",
    "port": "25",
    "secure": false,
    "tls": {
      "rejectUnauthorized": false
    }
  }


Note:

  • Setting "rejectUnauthorized": false will prevent the Digital Agent server from rebooting every time an email fails to send. We recommend a fall-back strategy if this happens using the on failure transition.
  • If your email is protected with 2FA, it might not work.