Reputation: 41
for outlook, it neither works in localhost nor in production server. but for testing purpose, I used Gmail in localhost and it worked.
but again in production, it didn't work.
MAIL_DRIVER smtp
MAIL_HOST smtp.office365.com
MAIL_PORT 587,
MAIL_USERNAME ********,
MAIL_PASSWORD ********,
MAIL_ENCRYPTION tsl
Upvotes: 4
Views: 8113
Reputation: 15
Try
'driver' => env('MAIL_DRIVER', 'sendmail'),
'host' => env('MAIL_HOST', 'localhost'),
it works.
Upvotes: -3
Reputation: 10061
Just set up correct Configuration:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME= //your username
MAIL_PASSWORD= //your password
MAIL_ENCRYPTION=tls
After .env
edit must be clear cache: php artisan config:cache
Upvotes: 5