Office 365 Setup

Hi,
Does anyone have Invoice Ninja Working in office 365?
We have just moved over and i cant get it to work.
I have Changed the .env file as below,

MAIL_MAILER=“smtp”
MAIL_HOST=“smtp.office365.com
MAIL_PORT=“587”
MAIL_USERNAME="hello@mydomain.com"
MAIL_PASSWORD=“123456789”
MAIL_ENCRYPTION=“ssl”
MAIL_FROM_ADDRESS="hello@mydomain.com"
MAIL_FROM_NAME=“My Business Name”

I have also tried with
MAIL_ENCRYPTION=“tls”

But I get the below error

Generating server: LO2P265MB5575.GBRP265.PROD.OUTLOOK.COM clientemail@gmail.com Remote Server returned ‘550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(8561) [CWLP265MB1811.GBRP265.PROD.OUTLOOK.COM]’ Original message headers: Received: from LO2P265MB5575.GBRP265.PROD.OUTLOOK.COM ([fe80::5529:eeb8:cd4c:2427]) by LO2P265MB5575.GBRP265.PROD.OUTLOOK.COM ([fe80::5529:eeb8:cd4c:2427%8]) with mapi id 15.20.5123.030; Fri, 1 Apr 2022 18:27:54 +0000 MIME-Version: 1.0 Content-Type: text/plain Date: Fri, 1 Apr 2022 18:27:54 +0000 Message-ID: [6k3UKEBgX1AOxFIvbfNUcaOr9PgyzSR0P9EWQQfU@rmydomainname.com] Subject: SMTP Setup Testing
Do I need to change anything in Office 365 Admin Area?
I have a ticket open with Microsoft but they are saying that their server is sending mail and they have tested my email accounts and they do so it’s not their problem.

Any help would be Great
Thanks
Mark

I dont know about 365, but gsuite has something like “less secure app” that needed to be enable before any application can use it mail services. As such, i assume that maybe 365 also has some security in place that maybe didnt allow SMTP to be able used freely.

maybe you need to asked different question to microsoft like “Is there any settings that i need to change in order for my app able to send email via 365 like gsuite “less secure app” settings?”

1 Like

Hi NoobKS92,
I have the same issue, read here Not sending emails/invoices - #8 by jinformatique
It seems that MS is deprecating basic and legacy authentication. What i did was to create a no-reply email account on my cpanel account and use that for sending emails.