+49 69 83008980 service@xqueue.com
Benötigen Sie Hilfe?

Im Maileon Help-Center finden Sie umfassende Dokumentationen zu unserem System.

Beliebte Suchanfragen: Importe | Rest-API | Integrationen | SMS

RSS Feeds

Sie sind hier:

Introduction

RSS is the abbreviation for ‘Rich Site Summary‘ or often also called ‘Really Simple Syndication‘, a technique which allows users to access updates to online content in a standardized, computer-readable format. It can be used e.g. to push news to news aggregators who can use RSS feeds from different sites to give a broad overview about various topics. Maileon can make use of such feeds to automatically fill articles in newsletters or even send automated newsletters when new items occur in the feed.

Maileon uses the RSS 2.0 specification and supports custom items attributes provided under a special namespace. This documentation describes the technical requirements for RSS feeds, if you have questions about realizing the later mentioned scenarios in Maileon itself, please contact our support team.

RSS Szenarios

Maileon supports three different scenarios to make use of RSS/ feeds:

  1. SmartContent
    This method allows manually filling/duplicating a single article from one RSS feed at a time.
    The newsletter designer creates a “master article” that contains placeholders for the different rss item attributes, e.g. the title, the description, or the image. The newsletter editor later selects the article, selects an option to fill contents from a RSS feed, selects the feed and finally marks the items of the feed that should be included in the newsletter. Maileon will then duplicate the article for each selected item and fill the contents from the items.
  2. SmartMailing
    This method allows filling several articles in a newsletter from different RSS feeds in one step (manually or using an API-call). However, no articles can be duplicated, each article has to be assigned to a given index of an item in a fixed RSS feed.
    The newsletter designer creates a newsletter with a fixed number of articles. Some of the articles (like e.g. “recent news”) contain RSS placeholder and are marked with a SmartTag indicating which element (exact position) from which RSS feed should be included when filling the data. Different articles can be marked with items from different feeds, however, it is a n:1 relation, meaning: several articles can get their contents from the same item of a feed but no article can contain elements from more then one item (i.e. the articles are not duplicated). The newsletter editor just needs one click and all marked articles will be filled from the appropriate sources.
  3. RSS2Email
    This method sends completely automated emails when a RSS feed changes.
    The newsletter designer creates a template similar to 1. but needs to manually take care of loops over RSS items. The editor basically does not do anything except specifying from which feed the data will come and specify a few settings e.g. the minimum amount of new elements required to send a mailing or the unique feature (publish time, title, combinations, …). Once the trigger mail is started, Maileon will check in a configurable interval for new items and if enough new items are available, the mail will be filled and sent. This is repeated each time when enough new items arrive.

RSS Specification

As noted in the introduction, Maileon uses the RSS 2.0 specification and. This means e.g. Maileon accepts images as “enclosures”. If someone has the idea to just add an “image” tag inside an item, this will not work.
PubDates should be given in english format and GMT timezone, in PHP you can generate such a timestamp e.g. by using: < ?php setlocale(LC_TIME , “en_EN”); echo gmstrftime(“%a, %e %b %Y %H:%I:%S %Z”);?>
Before registering a new feed with Maileon, a validator should be used to avoid most common mistakes, e.g.: https://validator.w3.org/feed/
Please note: for enclosures we do not require the ’size‘ attribute but ‚type‘ is mandatory.
An example for an item with an image attached:

<item>
  <title>Some title</title>
  <link>https://someurl.com</link>
  <description>This can contain some short description</description>
  <pubDate>Thu, 14 Sep 2017 07:19:00 GMT</pubDate>
  <guid>the_guid</guid>
  <content:encoded><![CDATA[Some more complex content, usually wrapped in CDATA]]></content:encoded>
  <enclosure type="image/jpeg" url="https://url.to.some.image.com/image.jpg"/>
</item>

If the regular item attributes are not sufficient, custom attributes can be added under the namespace

<rss ... xmlns:atom="http://www.w3.org/2005/Atom" xmlns:maileon="http://rssext.maileon.com/" ... version="2.0">
  <channel>
    ...
    <item>
      ...
      <maileon:foo>some text</maileon:foo>
      <maileon:bar>some text</maileon:bar>
    </item>
    <item>
      ...
    </item>
    ...
  </channel>
</rss>

Common Pitfalls

RSS is a rather simple construct and, except for images, the content is rather straight forward. Using the validators can help quickly finding most issues but from time to time something happens that prevents the mechanisms from working properly. This section contains the most common pitfalls.

Special Characters

The validators will find this error but you really should avoid using characters that have a special meaning in XML without wrapping them in CDATA tags.

Example 1: The character < tells the XML parser that a new tag will start:

<item>
  ...
  <description>This can contain some short description but nor with a special < character</description>
  ...
</item>

Example 2: The character & starts notation für special characters like ö wll be displayed as ö in the frontend:

<item>
  ...
  <description>This can contain some short description nut not with a special & character</description>
  ...
</item>

Both cases will be correctly processed if the XML construct CDATA is used that tells the parser to parse everything inside as a string:

<item>
  ...
  <description><![CDATA[This can contain some short description with all kinds of special <, &, etc. characters]]></description>
  ...
</item>

SSL Certificates

It might sound strange but most problems with RSS feeds that are reported have no RSS specific problem. Sometimes the items stay completely empty when filling them from a feed and sometimes the images are missing. The problem behind those cases are usually invalid SSL certificates. Sometimes the new feeds are provided under a new “sub-sub” domain, e.g. “https://rss.newsletter.domain.tld” but the certificate is only valid for “*.domain.tld” (which is NOT valid for “rss.newsletter.domain.tld”). Sometimes, even if the certificate for the feed is valid, the images are hosted on some server with an invalid SSL certificate. While users can “click” the warning away and accept the certificate anyways, Maileon will not do that as we need to make sure no one manipulated the entries and distributes wrong content.

Wrong PublishDate Time Format

Be aware that other formats, e.g. a german Di instead of Tue will not work for the publishing date. If you plan to provide such a standardized date and want to re-format it in a mailing using a Scriptlet-Mergetag, they currently accept german timestamps, ONLY. You can put the timestamp in a custom Maileon field like: < ?php setlocale(LC_TIME , “de_DE”); echo gmstrftime(“%a, %e %b %Y %H:%I:%S %Z”);?>
Then you can format it using an expression like: [[ % set $myVar (to_datetime ‘{{feed:item:maileon:datecomment onmissingvalue=”empty”}}’ ‘E, dd MMM yyyy kk:mm:ss z’ ) % datetime_to_string $myVar ‘d.MM.yyyy \’um\’ kk:mm \’Uhr\” ‘de’ ]]
This expression parses the (german) date and prints it as “12.07.2018 um 14:45 Uhr”.

Inhaltsverzeichnis