Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

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:

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
languagehtml
<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
languagexml
<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
breakoutModefull-width
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