Email component

Overview

The email component sends a new transactional message through Mandrill, using its send API resource for each incoming message.

Environment variable requirements

The email component can be configured using the following environment variables:

  • MANDRILL_API_KEY - Your Mandrill API Key.

  • MANDRILL_FROM_EMAIL - The email address from which the message/communication originates. This would be of the following format: no-reply@your-site-name

  • MANDRILL_FROM_NAME - The name of your company or service.

You must verify your domain before using this email component and configuring it with your environment variables.

Triggers

This component has no trigger functions. Therefore, this component cannot be used as the first one when designing an integration flow.

Actions

Send

This action sends your message, and several parameters can be configured for it.

Error handling types

You can choose different scenarios for exception handling using the "Do not throw an error when e-mail send failed" switch.

  • If the switch above has false value, an error event will be generated for each element of the Mandrill API’s response array that has status==(rejected | invalid). The error event will have the same as result from the Mandrill API.

  • If the switch above has a true value, error events will not generated to the flow level. In this case, the send result will be in output message.

Multiple recipients

The email component can send messages to multiple recipients. You can specify a comma separated list of email addresses to each of the following input parameters:

  • To

  • Cc

  • Bcc

Response structure

After sending, an object "results" is returned, which contains result entities for each recipient who was sent a message:

{
  "results": [
    {
      "RecipientType": "to",
      "Message": "INVALID",
      "ErrorCode": 0,
      "MessageID": "cae5a6d1233d430fa41cd4317b2ad070",
      "SubmittedAt": "2018-06-07T14:24:13.9150000+00:00",
      "To": "email1@example.com"
    },
    {
      "RecipientType": "to",
      "Message": "OK",
      "ErrorCode": 0,
      "MessageID": "97d78bc5b37f4b7b8a0517c409d5e43c",
      "SubmittedAt": "2018-06-07T14:24:13.9180000+00:00",
      "To": "email2@example.com"
    },
    {
      "RecipientType": "cc",
      "Message": "OK",
      "ErrorCode": 0,
      "MessageID": "c785b33ccfd546668752605d6c19f878",
      "SubmittedAt": "2018-06-07T14:24:13.9180000+00:00",
      "To": "email3@example.com"
    },
    {
      "RecipientType": "cc",
      "Message": "OK",
      "ErrorCode": 0,
      "MessageID": "511f60c5da974980b797cbbd2796b129",
      "SubmittedAt": "2018-06-07T14:24:13.9180000+00:00",
      "To": "email4@example.com"
    },
    {
      "RecipientType": "bcc",
      "Message": "OK",
      "ErrorCode": 0,
      "MessageID": "ba5d29e8ca2f4322961eac50180a4caf",
      "SubmittedAt": "2018-06-07T14:24:13.9180000+00:00",
      "To": "email5@example.com"
    }
  ]
}

Attachments

The email component can include attachment to an email message. More information about the attachments functionality on this provided elsewhere.

© 2015- Squiz Pty Ltd