title: sendmail 504 Gateway Time-out on laravel homestead
body: <p>I was coding a web APP using the lumen framework on windows with xampp, but after a few issues with routing and so own, I decided to give homestead and vagrant a try.</p>
  
  <p>I managed to get homestead installed and the routing is working better than xampp, but when I tried to use the mail function from php I found that command sendmail wasn't installed on the homestead virtual machine cause i was getting a 500 internal server error, and with xampp email sending was working just fine. So with shh I did a simple <strong>sudo apt-get install sendmail</strong> to install it. But when now whenever I try to use the mail function from php it just waits and waits and eventually I get a <strong>504 Gateway Time-out</strong>.</p>
  
  <p>What might be happening and what can I do to solve it?</p>
  
  <p>BTW: If you have any suggestions to replace the simple mail function for something else that works I'm willing to try it!</p>
  
  <p>Thank you guys for your time.</p>
  
  <p>This is my .env file</p>
  
  <pre><code>APP_ENV=local
  APP_DEBUG=true
  APP_KEY=SomeRandomKey!!!
  
  APP_LOCALE=en
  APP_FALLBACK_LOCALE=en
  
  DB_CONNECTION=sqlite
  DB_FILE=database.sqlite
  DB_DATABASE='storage/database.sqlite'
  DB_DRIVER=sqlite
  
  CACHE_DRIVER=memcached
  SESSION_DRIVER=memcached
  QUEUE_DRIVER=database
  
  MAIL_DRIVER=smtp
  MAIL_HOST=mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=[mailtrap_username]
  MAIL_PASSWORD=[mailtrap_password]
  MAIL_FROM_ADDRESS=example@example.com
  MAIL_FROM_NAME=Example
  </code></pre>