# SMTP issue with smtp.office365.com

**URL:** <https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562>\
**Category:** Installation Issues\
**Created:** [July 7, 2022, 9:12pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562 "2022-07-07T21:12:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 7, 2022, 9:12pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/1 "2022-07-07T21:12:42Z")

</div>

Hi All,

I am trying to use o365 SMTP but i have an error in my test. Even if i am using a password app but still with the same issue.

Below are the configuration that i use  
**Server name:** [smtp.office365.com](http://smtp.office365.com)  
**Port:** 587  
**Encryption method:** TLS or STARTTLS

ERROR  
Unrecognized authentication type [[BLAPR03CA0053.namprd03.prod.outlook.com](http://BLAPR03CA0053.namprd03.prod.outlook.com)]

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 7, 2022, 10:25pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/3 "2022-07-07T22:25:26Z")

</div>

@ricardo Is your mail server on premises with exchange or only in the cloud? And were you trying to send to account in your domain or outside of it?

Business subscription at Microsoft or personal? They have made some changes with smtp recently. So you have any logs on the MS of things?

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 8, 2022, 4:41pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/4 "2022-07-08T16:41:45Z")

</div>

Hi Garret,

Thanks for your answer.  
We are using o365 in the cloud. The email sent and receive will be for the same domain ( inside domain).  
The account that i am using to send email from passbolt servers has subscription Microsoft 365 Business Basic.  
I am using an password app and my password is OK i double checked

Logs from passbolt server  
[504] 5.7.4 Unrecognized authentication type [[BL0PR02CA0123.namprd02.prod.outlook.com](http://BL0PR02CA0123.namprd02.prod.outlook.com)]  
Could not send the test email.  
Error: SMTP server did not accept the password.

LOGs from azure ad  
Authentication requirement  
Single-factor authentication  
Status  
Failure  
Continuous access evaluation  
No  
Sign-in error code  
50126  
Failure reason  
Error validating credentials due to invalid username or password.  
Additional Details  
The user didn’t enter the right credentials. It’s expected to see some number of these errors in your logs due to users making mistakes.

Thank a lot for your help

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 8, 2022, 6:05pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/5 "2022-07-08T18:05:01Z")

</div>

@ricardo Regarding tenant wide or account specific SMTP enabling does this help? [Enable or disable SMTP AUTH in Exchange Online | Microsoft Docs](https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission)

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 8, 2022, 8:59pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/6 "2022-07-08T20:59:39Z")

</div>

Hi Garret,

Yes i have enabled authentication SMTP for that account, but sitll failing

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 9, 2022, 12:41am UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/7 "2022-07-09T00:41:39Z")

</div>

@ricardo Wow, that’s weird. Have you successfully reached that account via smtp with any other app? That would be my next step.

If you have gotten it working with another app, I can try to assist by trying to set mine it up with my o365 account and see what it takes.

Also, there is this [Cannot send e-mails with SMTP using passbolt with OFFICE 365](https://community.passbolt.com/t/cannot-send-e-mails-with-smtp-using-passbolt-with-office-365/4073) which suggests that maybe o365 requires some headers or something that postfix sends by default.

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [July 11, 2022, 7:34pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/8 "2022-07-11T19:34:34Z")

</div>

Hi,

In **/etc/passbolt/passbolt.php** configuration file, there is an EmailTransport section [passbolt\_api/passbolt.default.php at master · passbolt/passbolt\_api · GitHub](https://github.com/passbolt/passbolt_api/blob/master/config/passbolt.default.php#L66-L78) can you try to add `'className' => 'Mail'` ? The default value is `'Smtp'`.

Like this:

```auto
    'EmailTransport' => [
        'default' => [
            'className' => 'Mail', // << HERE
            'host' => 'localhost',
            'port' => 25,
            'username' => 'user',
            'password' => 'secret',
            // Is this a secure connection? true if yes, null if no.
            'tls' => null,
            //'timeout' => 30,
            //'client' => null,
            //'url' => null,
        ],
    ],

```

Thank you !

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 11, 2022, 8:19pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/9 "2022-07-11T20:19:20Z")

</div>

Hi Garret well if i dont find any solution i will try to use postfix o aws ses.

Hi \_jc thanks for your answer. i tried as you mentioned. Below are the output

## Debug email shell

Your email transport configuration is not set to use “Smtp”. (Mail is set instead)  
This email debug task is only for SMTP configurations.  
To fix this, edit EmailTransport.default.className in passbolt.php, and set className to “Smtp”

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 11, 2022, 10:51pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/10 "2022-07-11T22:51:19Z")

</div>

Hi guys,

now i am trying to use SES and its the same issue.  
Host: [email-smtp.us-east-1.amazonaws.com](http://email-smtp.us-east-1.amazonaws.com)  
Port: 587  
Username: AKIA4\*\*\*\*\*\*\*  
Password: \*\*\*\*\*\*\*\*\*  
TLS: true  
[535] Authentication Credentials Invalid  
Could not send the test email.  
Error: SMTP server did not accept the password.

the password its from CREATE SMTP Credentials from AWS SES

Please your help

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 12, 2022, 3:04am UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/11 "2022-07-12T03:04:58Z")

</div>

@ricardo can you see if you can connect to your o365 account with k9-mail app imap using your app password?

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 12, 2022, 2:26pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/12 "2022-07-12T14:26:47Z")

</div>

Hi Garrett,

I configured the k9-mail  
with this  
**Server name:** [outlook.office365.com](http://outlook.office365.com)  
**Port:** 993  
**Encryption method:** SSL  
user: mail of o365  
normal password : app password  
without client certified  
check on autodetect IMAP name  
check on With Compress

the error is user or password incorrect.

if i use Auth0.2 it will trigger to my MFA

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [July 12, 2022, 2:44pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/13 "2022-07-12T14:44:55Z")

</div>

Hi,  
For this kind of problem, you usually have to create an app password, as described in this documentation:

[https://support.microsoft.com/en-gb/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9](https://support.microsoft.com/en-gb/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9)

Can you give a try and let us know ?

Best regards,

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 12, 2022, 4:43pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/14 "2022-07-12T16:43:29Z")

</div>

@ricardo the endpoint should be same as you tried for passbolt. [smtp.office365.com](http://smtp.office365.com)

I just would like to rule out a bad username/password.

For incoming, use what you have above. But for outgoing use [smtp.office365.com](http://smtp.office365.com) port 587 with TLS.

If you are saying you can’t get past the incoming settings, then it appears to me your username and app password are not correct.

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 12, 2022, 5:50pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/15 "2022-07-12T17:50:30Z")

</div>

@ricardo If you are convinced that your app password is correct, my only other thought is check to see if your device is being quarantined. I have this on my domain and I have to approve any new device.

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 12, 2022, 9:18pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/16 "2022-07-12T21:18:53Z")

</div>

HI \_jc

yes i created my app following that page

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/f/f086c2acb047d213195c4713e22d9c66bde0be73.png)

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 12, 2022, 9:37pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/17 "2022-07-12T21:37:05Z")

</div>

Hi Garrett

i tried to configure as you mentioned but only allow me to put the imap configuration at the begining and the authentication failed. when i choose Auth0.2 it need approvall for administrator. i created a new app password to be sure if my password are correct. i coied and pasted to eliminate mistakes

 ![WhatsApp Image 2022-07-12 at 4.35.24 PM](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/9/9515c6e697151315c0a541e09ad05594623c3fa1.jpeg)

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 12, 2022, 9:38pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/18 "2022-07-12T21:38:01Z")

</div>

Hi Garrett

where i can check that?

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 12, 2022, 11:51pm UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/19 "2022-07-12T23:51:32Z")

</div>

> [@ricardo](#):
>
> where i can check that?

I am finding it on this page [https://outlook.office365.com/ecp/?p=ActiveSyncAccess&form=eac](https://outlook.office365.com/ecp/?p=ActiveSyncAccess&form=eac) it’s in the mobile device access section.

I have a quarantine rule:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/8/8ebf7a450ae8035c20e44838fb747b17a9f2a763.png)

---

<div class="post-metadata">

**Author:** ![ricardo](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@ricardo](https://community.passbolt.com/u/ricardo)\
**Post date:** [July 13, 2022, 1:14am UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/20 "2022-07-13T01:14:14Z")

</div>

Hi Garrett,

i dont find what you mentioned.  
My authenticator method is as the picture below

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/9/9fabf053367224647f3dd3958b1aa82d0bb0f4b0.png)

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [July 13, 2022, 1:30am UTC](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562/21 "2022-07-13T01:30:07Z")

</div>

@ricardo do you have a subscription directly with Microsoft or through another vendor like GoDaddy?

[Next page](https://community.passbolt.com/t/smtp-issue-with-smtp-office365-com/5562.md?page=2)
