Email Write Adaptor
  • 03 Sep 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Email Write Adaptor

  • Dark
    Light
  • PDF

Article summary

Creating an Email Write Adaptor

In order to create an Email Write Adaptor, it is necessary, or best practice, to create an Email Connection.

The Email Write Adaptor sends an HTML email through an SMTP Email Connection. The Email body and subject can be parameterized using any data elements. Any data element can specify the To and From fields.

  • Create a new item via the Create new item button.
  • Select the Email Adaptor, and give the adaptor a name.

Choose the connection from the drop down list in the Adaptor screen or edit it directly by clicking the pencil icon next to the connection name.

Specify the "To" and "From" locations from a suitable data source: schema, literal, or public variable. Currently, this must be just the email address - a descriptive name is not supported. 

This format is not supported: 

descriptive name <emailname@somerandomservice.com>

This format is supported: 

emailname@somerandomservice.com

Email Recipients

By default, the Email Write Adaptor only sends to one recipient at a time, and there isn't a way to CC.

The workaround is to put additional recipients in as an array (["support@Xponent.com", "another@Xponent.com"]) which will allow the adaptor to send to multiple recipients.

  • A comma-separated string will not work; it needs to be an array. A comma-separated string will result in only the first email being sent.
  • The best way to combine multiple email addresses from different schema locations and combine them into an array, is to use the JavaScript node.

Email Subject

The Email Subject line can be any parameterized string. The parameter names are enclosed in %% markers. 

Valid email subject lines: 

  Hello %%firstName%% Welcome to Xponent 

This provides a subject line that can be parameterized with the first name 

Email Body 

The Email Body can contain any valid parameterized HTML. This will be used as the body of the email and will be rendered by the email client. 

Whenever a new parameter is added to the Subject or the Body, it is necessary to press the Save Subject & Message Body / Update Parameters button. Any new parameters will then appear in the bottom half of the window and need to be populated before the Adaptor is valid.

Preview Email 

Once the adaptor is valid, the Preview E-mail button can be used to preview how the email may appear.

It is also recommended that you must test your HTML email in many email clients before using it in production.

The email preview shows the parameters in the Email Body and Subject. 


Validation Warnings

: All the invalid notifications will be displayed after expanding the Invalid Drop-down.

WarningNote
Adaptor(s) do not have connection setCreating a connection and choosing it from the Adaptor Connection drop down is necessary.
Email write needs a 'To' data sourceA valid data source for the email recipient has not been set
Email write needs a 'From' data sourceA valid data source for the email sender has not been specified
Email write needs a subjectA Subject for the email write adaptor is mandatory. It is good practice to personalize the subject as this cuts down on the possibility of the email being mistaken for spam.
Email write needs a messageNo message body has been provided.
 Received email body appears as 'error'When the email is created, one or more parameters are not populated in the schema.

Is it helpful? React and share your comment

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence