title: Use Mandrill API in Google Apps Script
body: <p>I want to use mandrill email sending api in my google apps script. In google script I have to use JSON code but I am not getting how I will use it. I am very new in Google apps script.</p>
  
  <pre class="lang-js prettyprint-override"><code>var m = new mandrill.Mandrill('XXXXXXXXXXX');
  var from_email = "user4@gmail.com";
  var to = '[
  {
    "email": "recipient.email@example.com",
      "name": "Recipient Name"
  }
  ],';
  
  // create a variable for the API call parameters
  var params = {
    "message": {
      "from_email":from_email,
      "to":[{"email":to}],
      "subject": "Sending a text email from the Mandrill API",
      "text": "I'm learning the Mandrill API at Codecademy, it's very difficult."
    }
  };
  
  function sendTheMail() {
    // Send the email!
    alert('this is a mail script');
    m.messages.send(params, function(res) {
      log(res);
    }, function(err) {
      log(err);
    });
  }
  </code></pre>
  
  <p>I am not getting how to use this code in Google Apps Script. </p>