What is the default value of MAIL_ENCRYPTION in Laravel 5.6?

Asked

Viewed 1,263 times

1

My doubt boils down to the definition of MAIL_ENCRYPTION, in the archive .env we have MAIL_ENCRYPTION=null and inside the archive config\mail.php line 74 we have the stretch:

'encryption' => env('MAIL_ENCRYPTION', 'tls'),

Whereas in the archive .env MAIL_ENCRYPTION was set to null, its final value will be tls?

I was in doubt because the attribution of null confused me.

1 answer

3


In that case it shall be as defined in .env (null).

> php artisan tinker
Psy Shell v0.8.17 (PHP 7.0.26 — cli) by Justin Hileman
>>> config('mail.encryption')
=> null

To use the default value, comment your .env with #MAIL_ENCRYPTION= or remove the line altogether.

> php artisan tinker
Psy Shell v0.8.17 (PHP 7.0.26 — cli) by Justin Hileman
>>> config('mail.encryption')
=> "tls"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.