How to Send Email in Laravel using Office365?

You know that Laravel provides several mail drivers like SMTP, mail, sendmailmailgun, mandrill, etc. Did you know that we can also send mail using office365 smtp server in laravel 6, laravel 7, laravel 8 and laravel 9 versions? In this example, I will show you how to send emails in Laravel using the office365 smtp server.

Before using this office365 service for sending mail in laravel, we have to configure our .env file according to office365 server requirements. So update the env file like below to use office365 service for sending mail in Laravel.


MAIL_FROM_NAME="your app name"


Read also: How to Setup Zoho SMTP Server in PHP Laravel?


Hope it can help you.


Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js