title: PHP create MIME message for Gmail API
body: <p>I'm trying to send email via the Gmail API using PHP. The documentation says I need to create a MIME message, encode the entire thing as a base64url string, and then set this string as the 'raw' property of the <code>Google_Service_Gmail_Message</code>.</p>
  
  <p>What is the best way in PHP to create this MIME message? I'm also using Laravel 5.1 in case anyone knows of a convenient way to do it using Laravel.  Here is the documentation I'm referring to for the Gmail API:</p>
  
  <p><a href="https://developers.google.com/gmail/api/guides/sending" rel="nofollow">https://developers.google.com/gmail/api/guides/sending</a></p>