Setup encrypted SMTP Mailer in Laravel 8

Tobias Etzold • January 24, 2022


When you enter your smtp mail credentials in Laravels .env file you are asked for the encryption. Since Laravel's mailer is based upon swiftmailer, you are able to set three different states.

  1. null: If you need no encryption, choose this. Normally this should be avoided.
  2. tls: This is the option to choose when you want to use STARTTLS.
  3. ssl: When you choose this option, SMTPS (SMTP over TLS) will be used.