This question has been flagged
6 Replies
32816 Views

I am trying to get office 365 working with Odoo.  I set it up under general settings, the test passes. 

When I try to use it to send a welcome email to a new user, I get this:


Mail Delivery Failed

Mail delivery failed via SMTP server 'smtp.office365.com'.

SMTPDataError: 550

5.7.60 SMTP; Client does not have permissions to send as this sender

Any Ideas on what could be causing this?

Avatar
Discard
Best Answer

Hi Guys,

I have prepared a guide on how to integrate the Odoo ERP with Office 365 mail server ( https://ventor.tech/guides/how-to-configure-emails-to-work-with-office-365-and-odoo/ ). It has been verified on many customers already, and all screenshots are from latest Odoo (11 at the moment of writing) and latest version of Office 365. 

At a glance what  should be done:

- Configure Outgoing mail Server in Office 365 as Relay Server

- Configure Catchall Email in Office 365

- Install Odoo module to inform users that they used the wrong email

- Configure Outgoing Mail Server in Odoo

- Configure Incoming Mail Server in Odoo

- Test Odoo ERP Emailing Setup

Avatar
Discard
Best Answer

Hi,

After some testing I found a solution that work for me - (v.16):

Configure Outgoing Mail Server as per Odoo Docs

change SMTP Server to server indicated in your DNS MX record (created/changed when you have configured your office 365 mail at all)

change SMTP Port to 25

Now Test Mail will pass

Avatar
Discard
Best Answer

same issue,

any update

Avatar
Discard
Best Answer

Setup Office 365 SMTP outlook.office365.com 995 SSL/TLS fails -> Client does not have permissions to send as this sender

1. In Odoo setup a SMTP server using your mail exchange (MX) endpoint record with port 25 no security

2. In Office 365 configure a connector so Odoo can send email to Office 365. Office 365 can then relay email to your organization mailboxes and to external recipients. Office 365 > admin > exchange > mail flow > connectors: configure a connector for your Odoo ("email") server with the internet connecting IP address (CIP: [IP address] from the internetheader the email). In my testcase the IP address of the router connecting to the internet.

Avatar
Discard
Best Answer

Hi!

So my fix is change code in /opt/odoo/odoo-server/openerp/addons/base/ir/ir_mail_server.py

You need to change "smtp_from" to "smtp_user" and also replace

after this:

If "mail.catchall.alias" is not set it defaults to "postmaster-odoo".

this:

default='postmaster',

#Because you have "postmaster", but you don't have "postmaster-odoo" on your own provider.

Hope it helps!


Kris

Avatar
Discard
Best Answer

Having the same issue! Here is my Log info:

----------

2015-07-03 00:31:50,211 1155 ERROR R2-0231v3 openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.office365.com'.

SMTPDataError: 550

5.7.60 SMTP; Client does not have permissions to send as this sender

2015-07-03 00:31:50,211 1155 ERROR R2-0231v3 openerp.addons.mail.mail_mail: failed sending mail.mail 1549

Traceback (most recent call last):

File "/opt/odoo/odoo-server/addons/mail/mail_mail.py", line 304, in send

context=context)

File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_mail_server.py", line 474, in send_email

raise MailDeliveryException(_("Mail Delivery Failed"), msg)

MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.office365.com'.\nSMTPDataError: 550\n5.7.60 SMTP; Client does not have permissions to send as this sender")

--------------

Any update on this would be greatly appreciated.

Thank you in advance.

Gerry.

Avatar
Discard