# Oauth Office 365 and email collector

**URL:** <https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437>\
**Category:** Using my Dolibarr\
**Created:** [March 9, 2023, 2:06pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437 "2023-03-09T14:06:18Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Plows](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/plows/32/5660_2.png) [@Plows](https://www.dolibarr.org/forum/u/Plows)\
**Post date:** [March 1, 2024, 1:18pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/22 "2024-03-01T13:18:40Z")

</div>

Hi,  
i have no PHP Warnings with my actual 19.0.0 Version PHP 7.4.33, also the mails are now being moved into archiv folder, my only problems are, no mail attachments in the ticket´s, i am using the same oauth service for both send and receive.

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/3/3e866980bfb9435e2e5e3a32ff12411f2198bafb.png)

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/1/1e9648dfae0091bf2029d7e6a912d7ea24406120.png)

---

<div class="post-metadata">

**Author:** ![FAdo84](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@FAdo84](https://www.dolibarr.org/forum/u/FAdo84)\
**Post date:** [March 1, 2024, 2:55pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/23 "2024-03-01T14:55:21Z")

</div>

Ciao,

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/4/4f568ee6a8f18227d2af132414c81aa870006516.png)

Now with the new version 19.0 I use the standard Oauth for sending/smtp.

If you need other info feel free to ask.

Ciao

---

<div class="post-metadata">

**Author:** ![JeremyF](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@JeremyF](https://www.dolibarr.org/forum/u/JeremyF)\
**Post date:** [May 24, 2024, 4:58am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/24 "2024-05-24T04:58:26Z")

</div>

Hi,

Thank you for this thread.  
I try to configure only SMTP part.  
The Oauth token part is ok but I cannot send mail. I’m facing “Authenticator XOAUTH2 returned Expected response code 235 but got code ‘535’, with message '535 5.7.3 Authentication unsuccessful” when I try to send with “Swift Mailer socket library”, and also “Response: 535 5.7.3 Authentication unsuccessful” when I try with “SMTP/SMTPS socket library”…

What I missed ? 🧐

Can you share me your Email configuration ?

---

<div class="post-metadata">

**Author:** ![Plows](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/plows/32/5660_2.png) [@Plows](https://www.dolibarr.org/forum/u/Plows)\
**Post date:** [May 28, 2024, 2:45pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/25 "2024-05-28T14:45:04Z")

</div>

Hi,  
what Dolibarr Version do you have?

Jason.

---

<div class="post-metadata">

**Author:** ![JeremyF](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@JeremyF](https://www.dolibarr.org/forum/u/JeremyF)\
**Post date:** [May 28, 2024, 3:45pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/26 "2024-05-28T15:45:05Z")

</div>

It’s 19.0.1.  
Since there, I succeed to connect via OAuth but can you confirm that we can connect only a single account to send mail (and so sent messages are stored in that account only) ?

---

<div class="post-metadata">

**Author:** ![Plows](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/plows/32/5660_2.png) [@Plows](https://www.dolibarr.org/forum/u/Plows)\
**Post date:** [May 29, 2024, 4:48am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/27 "2024-05-29T04:48:58Z")

</div>

Hi,  
i am on 19.0.2, i use a single account but the recipients receive different adresses e.g. for tickets or bills, you are right that all sent mails are stored in the sent account which is the owner of the accounts tickets and bills (both shared accounts).  
Curios that the e-mail collector for tickets is moving the mails to the correct Archive folder of the Ticket account.  
My problem since 19.0.1 is that the e-mail colletor is not receiving attachments.

---

<div class="post-metadata">

**Author:** ![JeremyF](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@JeremyF](https://www.dolibarr.org/forum/u/JeremyF)\
**Post date:** [May 29, 2024, 6:58am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/28 "2024-05-29T06:58:15Z")

</div>

I’ve not played yet with mail collector but it will come soon so I’ll get back to you :wink:

---

<div class="post-metadata">

**Author:** ![Schesco](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Schesco](https://www.dolibarr.org/forum/u/Schesco)\
**Post date:** [September 3, 2024, 2:08pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/29 "2024-09-03T14:08:50Z")

</div>

Hi @JeremyF,

Did you manage to send mails ? I’m encountering the same problem :

> BlockquoteExpected response code 250 but got code ‘530’, with message '530 5.7.57 Client not authenticated to send mail.

The Oauth2 tocken part is also working for me and the azure application does have the rights to send mails.

---

<div class="post-metadata">

**Author:** ![Plows](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/plows/32/5660_2.png) [@Plows](https://www.dolibarr.org/forum/u/Plows)\
**Post date:** [September 3, 2024, 3:57pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/30 "2024-09-03T15:57:42Z")

</div>

Hi,  
are you using the right smtp-user, it should be the same as in the azure application, i did not get it working with a shared mailbox.

---

<div class="post-metadata">

**Author:** ![Schesco](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Schesco](https://www.dolibarr.org/forum/u/Schesco)\
**Post date:** [September 3, 2024, 4:12pm UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/31 "2024-09-03T16:12:22Z")

</div>

Hi @Plows,  
Yes, it’s the same smtp-user, same email adress.

---

<div class="post-metadata">

**Author:** ![JeremyF](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@JeremyF](https://www.dolibarr.org/forum/u/JeremyF)\
**Post date:** [September 4, 2024, 7:34am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/32 "2024-09-04T07:34:30Z")

</div>

Hi,  
Yes it was working for me.  
What Dolibarr version ?

---

<div class="post-metadata">

**Author:** ![Schesco](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Schesco](https://www.dolibarr.org/forum/u/Schesco)\
**Post date:** [September 9, 2024, 8:44am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/33 "2024-09-09T08:44:43Z")

</div>

Hi @JeremyF,

I tried on several version, 18, 19.0.1, 19.0.2, 19.0.3.

---

<div class="post-metadata">

**Author:** ![JeremyF](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@JeremyF](https://www.dolibarr.org/forum/u/JeremyF)\
**Post date:** [September 9, 2024, 10:31am UTC](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437/34 "2024-09-09T10:31:17Z")

</div>

I no longer have access to the environment with this configuration, but with version 19.0.1 and the mail address consistent between the OAuth and the sender it should be fine.

[Previous page](https://www.dolibarr.org/forum/t/oauth-office-365-and-email-collector/23437.md?page=1)
