wiki:send_mail_php_laravel_swiftmailer_using_microsoft_smtp_office365
Table of Contents
Send mail with PHP Laravel/swiftmailer using Microsoft smtp.office365.com
In .env file change
“MAIL_ENCRYPTION=starttls” to “MAIL_ENCRYPTION=tls”
In conf/mail.php, line 59 set MAIL_FROM_ADDRESS
to be same as in .env file MAIL_USERNAME
value
'host' => env('MAIL_HOST', 'your-mail-host'), 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', 'your-mail@host.com'), 'name' => env('MAIL_FROM_NAME', 'Your User Name'), ],
.env file
... MAIL_USERNAME=your-mail@host.com ...
Tested on
See also
References
wiki/send_mail_php_laravel_swiftmailer_using_microsoft_smtp_office365.txt · Last modified: 2021/04/08 15:34 by antisa