What is the default value of MAIL_ENCRYPTION in Laravel 5.6?

0

My question is the definition of MAIL_ENCRYPTION , in file .env we have MAIL_ENCRYPTION=null and inside file config\mail.php line 74 we have the excerpt:

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

Considering that the file .env MAIL_ENCRYPTION was set to null , its final value will be tls ?

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

    
asked by anonymous 07.03.2018 / 00:12

1 answer

3

In this case it will be what is set 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 once.

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