4
votes

I want to use my company office365 email to send email from laravel 5.4.

So I edit my .env like this :

MAIL_DRIVER=smtp
MAIL_HOST=domaine-com.mail.protection.outlook.com
MAIL_PORT=25
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME=WebsiteName

I started with default laravel auth system. When I fill the input with email on my database and click send, I've got a success message :

We have e-mailed your password reset link!

But I've got nothing on my email, nothing on my spam or everywhere else.

Did I miss a step ?

Thank for your help

2
MAIL_ENCRYPTION=nullSachin Aghera
Still nothing :/Furya

2 Answers

0
votes

Are you sure your settings are correct there?

I think you should be using port 587 for SMTP for Office 365.

EDIT

Check out this answer also, which has more information: Laravel sending email with Office 365 Email

There is bound to be a small part of your config not set correctly, and it's hard to tell which part, as you've obfuscated the real data (understandably).

0
votes

you can also use this Mail-Driver: https://github.com/motze92/office365-mail

This send's email from the Graph Rest Api and works better than the Office365 SMTP what gives many times unexpected timeouts and errors.