title: Laravel Sendmail SMTP Gmail
body: <p>I built my Laravel project in XAMPP on my localhost, and when I deployed the project to my shared host, the mail does not send. It was working fine in my localhost, and I tried every solution on StackOverflow and Google. There is nothing that works for me: my email is with Gmail, so I used their SMTP info in my .env file.</p>
  <pre><code>APP_NAME=Laravel
  APP_ENV=local
  APP_KEY=base64:5yMVTQwQlBQF0G0h4IM7Cqemh0hKis4+VC5S9vdhfgc=
  APP_DEBUG=true
  APP_URL=http://example.com
  
  LOG_CHANNEL=stack
  LOG_LEVEL=debug
  
  DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=
  DB_USERNAME=example
  DB_PASSWORD=example
  
  BROADCAST_DRIVER=log
  CACHE_DRIVER=file
  QUEUE_CONNECTION=sync
  SESSION_DRIVER=file
  SESSION_LIFETIME=120
  
  MEMCACHED_HOST=127.0.0.1
  
  REDIS_HOST=127.0.0.1
  REDIS_PASSWORD=null
  REDIS_PORT=6379
  
  MAIL_MAILER=smtp
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=465
  MAIL_USERNAME=example@example.com
  MAIL_PASSWORD=example
  MAIL_ENCRYPTION=ssl
  MAIL_FROM_ADDRESS=example@example.com
  MAIL_FROM_NAME=&quot;${APP_NAME}&quot;
  
  AWS_ACCESS_KEY_ID=
  AWS_SECRET_ACCESS_KEY=
  AWS_DEFAULT_REGION=us-east-1
  AWS_BUCKET=
  
  PUSHER_APP_ID=
  PUSHER_APP_KEY=
  PUSHER_APP_SECRET=
  PUSHER_APP_CLUSTER=mt1
  
  MIX_PUSHER_APP_KEY=&quot;${PUSHER_APP_KEY}&quot;
  MIX_PUSHER_APP_CLUSTER=&quot;${PUSHER_APP_CLUSTER}&quot;
  </code></pre>