Fully personalize messages with our Dynamic Content examples

Dynamic Content allows you to personalize the content of your message and to reuse content. It greatly increases your efficiency and it gives a boost to the relationship with your clients thanks to the more relevant content.

Dynamic Content allows you to include data from your database in your e-mail message.
This is a 3 step process:

Step 1: Create a Dynamic Content Template

You can create a Dynamic Content template with the HTML editor.
Once you determine the overall structure of you message, content can be divided in different blocks. Each content blok gets a unique name.
Content blocks in the template will then be replaced with a variable.

Exemple:

A title can be represented by the variable: [$title]


As Flexmail DC-templates are fully Smarty-compatible, we can use all its functions for template creation.

Step 2: Create an XML content file

Using an XML file you can now automatically link the content of your email message with the template. The XML file contains the actual content for your template variables.

Example:
<xml> <titel> <data>This is the title for my article </data> </titel> </xml> Step 3: Import the XML into Flexmail

Flexmail can now generate the message automatically based on the template and your XML.
You can either upload the XML file or paste its content in Flexmail

Take a look at the following cases:

Case 1
Template

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Newsletter</title> </head> <body> <p><font face="helvetica">[$content]</font></p> </body> </html>
XML data file
<xml version="1.0" encoding="UTF-8"> <data> <content>Hello World!</content> </data> </xml>
E-mail message

case 1

Case 2
Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Newsletter</title> </head> <body> <h1>[$title]</h1> <p>[$text]</p> </body> </html>
XML data file
<xml version="1.0" encoding="UTF-8"> <data> <title>Newsletter October 2010</title> <text> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </text> </data> </xml> E-mail message





Case 3
Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Newsletter</title> </head> <body> <h1>BBC World News</h1> <table border="0"> <tbody> [foreach from=$articles item=article name=articleIterator] <tr> <td><h2>[$article.title]</h2></td> </tr> <tr> <td> <img src="[$article.image]" width="300" align="left" /> <b>[$article.intro]</b> <br /> <br /> [$article.text|nl2br] </td> </tr> <tr> <td><a href="[$article.url]" target="_blank">Read more</a></td> </tr> [if $smarty.foreach.articleIterator.last==false] <tr> <td><hr /></td> </tr> [/if] [/foreach] </tbody> </table> </body> </html>
XML data file <xml version="1.0" encoding="UTF-8"> <data> <articles> <article> <title>Design fault 'may have caused A380 scare' - Qantas</title> <intro>The engine failure that caused the emergency landing of a Qantas Airbus A380 in Singapore may have been caused by a design fault, the Australian airline says.</intro> <text>"We believe this is most likely some kind of material failure or a design issue," CEO Alan Joyce said, addingthe investigation was continuing. One of the engines failed after take-off from Singapore's Changi airport. Qantas has grounded its six A380 jets pending emergency checks. Mr Joyce said it was too early to say what exactly caused the problem, but he said the blowout was "an engine issue" and not one of maintenance on the two-year-old plane. The incident occurred on Thursday, when flight Qantas QF32 experienced an engine failure over western Indonesia, before safely returning to Changi airport. It was carrying 440 passengers and 26 crew.</text> <url>http://www.bbc.co.uk/news/world-asia-pacific-11700401</url> <image>http://news.bbcimg.co.uk/media/images/49822000/jpg/_49822165_010562973-1.jpg</image> </article> <article> <title>Electric current to the brain 'boosts maths ability'</title> <intro> Applying a tiny electrical current to the brain could make you better at learning maths, according to Oxford University scientists. </intro> <text>They found that targeting a part of the brain called the parietal lobe improved the ability of volunteers to solve numerical problems. They hope the discovery could help people with dyscalculia, who may struggle with numbers. Another expert said effects on other brain function would need checking. The findings are reported in the journal Current Biology.</text> <url>http://www.bbc.co.uk/news/health-11692799</url> <image>http://news.bbcimg.co.uk/media/images/49816000/jpg/_49816534_jex_859016_de29-1.jpg</image> </article> </articles> </data> </xml> E-mail message




Case 4
Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Newsletter</title> </head> <body> <h1>BBC World News</h1> <table border="0"> <tbody> [foreach from=$articles item=article name=articleIterator] <tr> <td><h2>[$article.title]</h2></td> </tr> <tr> <td> <img src="[$article.image]" width="300" align="left" /> <b>[$article.intro]</b> <br /> <br /> [$article.text|nl2br] </td> </tr> <tr> <td><a href="[$article.url]" target="_blank">Read more</a></td> </tr> [if $smarty.foreach.articleIterator.last==false] <tr> <td><hr /></td> </tr> [/if] [/foreach] <tr> <td style="text-transform: uppercase; font-weight: lighter; font-size: 24px; color: #362b24; height: 40px;" valign="top">[$title]</td> </tr> <tr> <td><p>[$intro]</p></td> </tr> <tr> <td><img src="http://www.flexmail.be/voorbeeldtemplates/voorbeeld6/lijn.gif" /></td> </tr> </tbody> </table> <br /> [foreach from=$articles item=article name=articleIterator] <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tbody> <tr> <td style="width: 160px;" valign="top"><imgsrc="[$article.image]" width="160"></imgsrc="[$article.image]"></td> <td width="10"></td> <td valign="top"> <table border="0" cellspacing="0" cellpadding="0" style="font-family: Verdana, Geneva, sans-serif; font-size: 11px; line-height: 18px;"> <tbody> <tr> <td style="text-transform: uppercase; font-weight: lighter; font-size: 12px; color: #362b24; height: 30px;" valign="top">[$article.title]</td> </tr> <tr> <td>[$article.text]</td> </tr> <tr> <td align="left"><a href="[$article.url]">Continue reading ...</a></td> </tr> [if $smarty.foreach.articleIterator.last==false] <tr> <td><img src="http://www.flexmail.be/voorbeeldtemplates/voorbeeld6/lijn.gif" /></td> </tr> [/if] </tbody> </table> </td> </tr> </tbody> </table> <br /> [/foreach] <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tbody> <tr> <td style="width: 160px;" valign="top"></td> <td width="10"></td> <td valign="top"> <table border="0" cellspacing="0" cellpadding="0" style="font-family: Verdana, Geneva, sans-serif; font-size: 11px; line-height: 18px;"> <tbody> <tr> <td> [$footer] <br /> <br /> Digital Greetings, <br /> <br /> Jacqueline Mahieux </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </body> </html>
E-mail message