email - Using dynamic or conditional tags in MailJet -


i working on sending transactional emails our recipients according visitors activity in last week, such i'll want deliver @ end following email including 12 profiles maximum:

hi, user, bla bla these profiles:     visitor's name, age, link visitor's image     maria         , 39 , http://images.fixapp.com/t-16985.jpg     * * 12 profiles  * elena        , 33, http://images.fixapp.com/t-16915.jpg  click here see visitors profiles 

so far advanced task doing following:

  1. added custom properties 12 profiles
  2. i've uploaded contact list details data via csv file
  3. i've written raw html template , bounded template's placeholders custom properties of list details example:

<div class="new__faces__img"><img src='[[data:visitor1.photo]]'></div>  <div class="new__faces__name">    <span>[[data:visitor1.name]]</span>, [[data:visitor1.age]]  </div>    > other visitors ...    <div class="new__faces__img"><img src='[[data:visitor12.photo]]'></div>  <div class="new__faces__name">    <span>[[data:visitor12.name]]</span>, [[data:visitor12.age]]  </div>

what still don't know how handle case when user has less 12 visitors. mandrill email service in such cases offers conditional merge tags. way of mailjet resolve issue?

i'm leading developers relations @ mailjet. first of all, interest in our api!

at moment, our system doesn't support object properties won't able use them featured in html code, visitor1.photo. represent such data can create metadata each visitor's information, visitor1_photo or visitor1_age.

from there, you'll able use in html code you're doing in example.

we're in process of developing advanced templating features. meanwhile, best way pre-process message on side generate final template , send via our send api or smtp.

you can same behaviour marketing campaign using x-mailjet-campaign smtp header (mj-campaign in send api) group messages under same campaign.

hope helps!


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -