title: Unable to figure out username and password for Sendgrid SMTP (Laravel)
body: <p>I work on quite a large site and we recently had a big vulnerability that exposed our .env details. We've since changed all of our API keys, including Sendgrid.</p>
  
  <p>The problem I have here is that we can't figure out what the correct scheme is for the MAIL_USERNAME and MAIL_PASSWORD variables.</p>
  
  <p>The key they provide is something like this: <code>SG.&lt;some characters&gt;.&lt;some characters&gt;</code></p>
  
  <p>In the .env we had before, the MAIL_USERNAME was set to the first "some characters" and presumably the password was the second part although they don't allow us to view the API key.</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.sendgrid.net
  MAIL_PORT=587
  MAIL_USERNAME=&lt;first part of API key&gt;
  MAIL_PASSWORD=&lt;second part of API key&gt;
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>Can anyone tell me if I'm doing something completely stupid here, or point me in the right direction?</p>