The write adaptor for emails sends an HTML email through an email connection. You can parameterize the email Message Body and Subject using any data elements, and you can specify the To and From fields by any data element.
To use the email adaptor, complete the following steps:
Your adaptor is now created and ready to use. To close the adaptor configuration page, click the X to the right of the adaptor name in the tab bar near the top of the webpage.
By default, the email write adaptor only sends to one recipient at a time, and there is not a way to copy another recipient. The workaround is to add other recipients as an array allowing the adaptor to send to several recipients, as demonstrated in the following example:
Note
The Email Subject line can be any parameterized string. The parameter
names are enclosed in %%
markers.
The following example provides a subject including a parameter that personalizes the subject with the user’s first name:
Hello %%firstName%%!
The Message Body area can contain any valid parameterized HTML used as the body of the email and rendered by the email client. Whenever a new parameter is added to the Subject or to the Message Body, it is necessary to click Save Subject & Message Body / Update Parameters. Any new parameters will display in the lower-half of the page and must be populated before the adaptor is valid.
After the adaptor is valid, you can click Preview E-mail to preview how the email body may appear. Acquia recommends you test your HTML email with several email clients before using in production.
The email preview displays the parameters in the Message Body.
Warning | Description |
---|---|
Adaptor does not have connection set | It is necessary to create a connection and choose it from the Adaptor Connection list. |
Email write must have a To data source | A valid data source for the email recipient has not been configured. |
Email write must have a From data source | A valid data source for the email sender has not been specified. |
Email write must have a subject | A subject for the email write adaptor is mandatory. It is good practice to personalize the subject as personalization reduces the risk the email is marked as spam. |
Email write must have a message | No message body has been provided. |
Received email body appears as error | One or more of the parameters is not populated in the schema when the email is created. |