title: Mandrill ValidationError
body: <p>Very excited to be asking my first question on StackOverflow. I've been relying on it to teach myself quite a lot over the years!</p>
  
  <p>My question is this. I am getting the following error when trying to send a mail through Mandrill's API:</p>
  
  <pre><code>{"status":"error","code":-1,"name":"ValidationError","message":"You must specify a key value"}
  </code></pre>
  
  <p>The code that follows is what I am using to try to send the mail:</p>
  
  <pre><code>&lt;?php
  $to = 'their@email.com';
  $content = '&lt;p&gt;this is the emails html &lt;a href="www.google.co.uk"&gt;content&lt;/a&gt;&lt;/p&gt;';
  $subject = 'this is the subject';
  $from = 'my@email.com';
  
  $uri = 'https://mandrillapp.com/api/1.0/messages/send.json';
  $content_text = strip_tags($content);
  
  $postString = '{
  "key": "RR_3yTMxxxxxxxx_Pa7gQ",
  "message": { 
   "html": "' . $content . '",
   "text": "' . $content_text . '",
   "subject": "' . $subject . '",
   "from_email": "' . $from . '",
   "from_name": "' . $from . '",
   "to": [
   {
   "email": "' . $to . '",
   "name": "' . $to . '"
   }
   ],
   "track_opens": true,
   "track_clicks": true,
   "auto_text": true,
   "url_strip_qs": true,
   "preserve_recipients": true
  },
  "async": false
  }';
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $uri);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
  $result = curl_exec($ch);
  echo $result;
  
  ?&gt;
  </code></pre>
  
  <p>What could be causing the validation error in the message. I am providing my API key, AND it's valid!</p>
  
  <p>Hope someone will be able to help, and thanks for generally being AWESOME here!</p>
  
  <p>Thanks!</p>