title: How would you send a mail through mandrill with phantomjs?
body: <p>I'm doing some screen scraping with phantomjs. I'm trying to implement an error handling system that sends an email with the mandrill api <a href="https://mandrillapp.com/api/docs/messages.html" rel="nofollow">https://mandrillapp.com/api/docs/messages.html</a> when the scraper fails. </p>
  
  <p>The mandrill api takes a post method like the one below.
  How would you send a mail through mandrill with phantomjs?  </p>
  
  <pre><code>var data = {
      "key": "VdFwNvj-dLwaI6caAh8ODg",
      "message": {
          "html": "This aggression will not stand",
          "text": "This aggression will not stand",
          "subject": "example subject",
          "from_email": "the-dude@gmail.com",
          "from_name": "The Dude",
          "to": [{
              "email": "lebowski@gmail.com",
              "name": "lebowski"
          }]
      },
      "async": false
  };
  
  $.ajax({
      type: "POST",
      url: 'https://mandrillapp.com/api/1.0/messages/send.json',
      data: data
  });
  </code></pre>