...
The first element is the newsletter itself, the HTML file plus images or other attachments. The HTML code will be created by the CMS or your web application which uses your CMS. It however must be compatible to common email clients. You can test compatibility with Litmus (https://www.litmus.com ), an inbox preview integration with the UM is available (https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/Inbox_preview.html).
The UM will send the HTML code basically as is, apart from the following modifications:
Personalization instructions
You can add personalizations instructions within the HTML code or text which will be evaluated by the UM which then modifies the resulting HTML for each recipient. E.g. it is possible to add a personalized salutation (“Dear Mrs Miller”) or add placeholders which will be replaced by an internal UM value like the recipients email address. It is also possible to add a bracket around a content module to hide or show that content based on a condition like “is a member of segment XY”.
For details see: https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/Personalization.htmlTracking
If configured the UM will add a tracking pixel to track whether a recipient has opened the email. The UM then will also rewrite every external link in the email to send it through its link tracker.
For details see: https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/Tracking_configuration.htmlPersonalized unsubscribe link
In order to allow each recipient to unsubscribe from the newsletter a link can be added to the newsletter, usually in the footer. The link target is a web page which contains a UM newsletter form. It is personalized and will contain a special hash string which helps the UM to identify the recipient.
For details see section “Link generator” on https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Newsletter/Newsletter_App_configuration.html
When sending a newsletter the UM will read this HTML file and send it to the specified recipients. The HTML file can be defined as a URL (to which the UM will need access) or inline in the XML event file (see below) which is sent to the UM web service.
...
The newsletter can contain pictures and attachments. Those files can be either referenced as a URL in the HTML or can be sent inline base64 encoded in a <file> tag inside the XML event file. The UM must be able to fetch the images from the URL, if the option to send the images with the email is set.
For details, see section “<file>” on https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/XML_elements_and_attributes.html.
Example HTML file
Codeblock | ||
---|---|---|
| ||
<html> <head><title>Your monthly newsletter</title></head> <body> <h1>Your monthly newsletter</h1> <p> <!-- the following code will be replaced by the UM with a personalized salutation --> {switch|salut |male |Dear Mr {lastname}, |female |Dear Mrs {lastname}, |family |Dear family {lastname}, |company|Dear Sir / Madam, |default|Dear Sir / Madam, } this is the introduction text shown to every recipient. </p> <p> This section is shown to every recipient. </p> {if|inVChannel('region_west')| <p> This section is only shown to recipients in the segment "region_west". </p> } <h2>Footer</h2> <ul> <li><a href="https://yourwebsite/">Visit us on the web</a></li> <li><a href="https://yourwebsite/newsletter/?c={msgid}&action=unsubscribe">Unsubscribe via personalized link</a></li> </ul> <!-- this will be replaced by the tracking pixel --> {trackerpixel} </body> </html> |
...
Codeblock | ||
---|---|---|
| ||
<event> <destination> <channel>recipients</channel> </destination> <data> <email obeyPreferHtml="false"> <subject>Email subject</subject> <htmltext embedImages="all" inline="true"> <![CDATA[ <html><body> ...your newsletter html... <img src="logo.png" title="Image from 'inline' attachment, see below"/> </body></html> ]]> </htmltext> <!-- Attach file from base64 to be referenced from HTML body --> <file name="logo.png" disposition="inline" inline="true">iVBORw0KGgoAAAANSUhEUgA[...]ORK5CYII=</file> <!-- Attach file from base64 --> <file name="invoice.pdf" disposition="attachment" inline="true">J892hhiehdh[...]AAAAASUVORK5CYII=</file> <!-- Attach file from local path --> <file inline="false">/CMS/export/static/gtc.pdf</file> </email> </data> </event> |
For details see: https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/XML_event_file.html
Universal Messenger EventFile REST interface
...
Codeblock | ||
---|---|---|
| ||
curl <um-rest-url>/de.pinuts.cmsbs.restsend.EventFile/?open=<cmsbs.open> --data-binary @eventfile.xml --header "Content-Type: text/xml; charset=UTF-8" |
For details see: https://wwwdownloads.universal-messenger.de/knowledge-base/interndocumentation/doc-enuniversal-messenger/html/UM_EN/Developer/Passing_the_event_file_via_REST_call.html