title: Each-loop in mandrill using handlebars and Mandrill-dotnet -library
body: <p>I'm using Mandrill to send emails, and are using Handlebars to render content in the email.</p>
  
  <p>If I add variables like this everything works fine:</p>
  
  <p>Backend:</p>
  
  <pre><code>message.AddRecipientVariable("test@gmail.com", "MYVALUE", "some value");
  </code></pre>
  
  <p>Html-Template:</p>
  
  <pre><code>&lt;p&gt;{{MYVALUE}}&lt;/p&gt;
  </code></pre>
  
  <p>But if I try to use {{#each}} - the each section in the sent email is empty. What am I doing wrong here. Do I pass the <code>objStringArray</code> the wrong way or is there somthing else missing out to render the loop?</p>
  
  <p>Backend:</p>
  
  <pre><code>var objList = new List&lt;MyObj&gt; {new MyObj() {Qty = "125"}, new MyObj() { Qty = "16"}};
  
  var jsonSerialiser = new JavaScriptSerializer();
  var objStringArray = jsonSerialiser.Serialize(objList.ToArray());
  
  message.AddRecipientVariable("test@gmail.com", "VALUES", objStringArray);
  
  message.merge_language = "handlebars";
  _mandrillApi.SendMessage(message, templateName, new List&lt;TemplateContent&gt;());
  </code></pre>
  
  <p>Html-Template:</p>
  
  <pre><code>&lt;ul&gt;
    {{#each VALUES}}
      &lt;li&gt;{{Qty}}&lt;/li&gt;
    {{/each}}
  &lt;/ul&gt;
  </code></pre>
  
  <p><a href="http://blog.mandrill.com/handlebars-for-templates-and-dynamic-content.html#loops" rel="nofollow">Handlebars in mandrill</a></p>
  
  <p><a href="https://github.com/shawnmclean/Mandrill-dotnet" rel="nofollow">Mandrill-dotnet</a></p>