title: Mandrill with php to send .xls attachment, blank file
body: <p>Is it just me or is there almost no documentation on how to do this? Mandrill's site isn't much help. Anyway...here's the problem...</p>
  
  <pre><code>try {
      $mandrill = new Mandrill('API_KEY');
      $attachment = file_get_contents("../template.xls");
      $attachment_encoded = base64_encode($attachment);
      $message = array(
          'html' =&gt; '&lt;p&gt;Some html text&lt;/p&gt;',
          'text' =&gt; 'Some text',
          'subject' =&gt; 'Subject',
          'from_email' =&gt; 'email@domain.com',
          'from_name' =&gt; 'Name',
          'to' =&gt; array(
              array(
                  'email' =&gt; 'myemail@domain.com',
                  'name' =&gt; 'Name',
                  'type' =&gt; 'to'
              )
          ),
          'attachments' =&gt; array(
              array(
                  'type' =&gt; 'application/vnd.ms-excel',
                  'name' =&gt; 'New_Features_Submission.xls',
                  'path' =&gt; $attachment_encoded
              )
          )
      );
      $async = false;
      $result = $mandrill-&gt;messages-&gt;send($message, $async);
      print_r($result);
  } catch (Mandrill_Error $e) {
      echo 'A Mandrill error occured: ' . get_class($e) . '-' . $e-&gt;getMessage();
      throw $e;
  }
  </code></pre>
  
  <p>The email sends correctly, but I can't even open the .xls file. I tried using 'application/xls' for the type, that didn't work either. I'm not familiar with encoding, help please!</p>