Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I cannot send outgoing emails with the microsoft office 365 email server. I configured an IMAP & SMTP Client with Thunderbird, working perfectly. I configured OpenErp with a Google account - works perfectly --> the only emailserver not working seems to be office 365, but as a standalone client using smtp (not native exchange protocol) I guess the issue is not at the Microsoft offering.
Please help, attached my log file error message I get when trying to send an email.
OpenERP Server 7.0-20131103-002534:DBprod:ERROR:openerp.addons.base.ir.ir_mail_server:Mail Versand schlug via SMTP Server 'smtp.office365.com' fehl.#012SMTPDataError: 550#0125.7.1 Client does not have permissions to send as this sender#012Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_mail_server.py", line 463, in send_email#012 smtp.sendmail(smtp_from, smtp_to_list, message.as_string())#012 File "/usr/lib/python2.7/smtplib.py", line 737, in sendmail#012 raise SMTPDataError(code, resp)#012SMTPDataError: (550, '5.7.1 Client does not have permissions to send as this sender')
OpenERP Server 7.0-20131103-002534:DBprod:ERROR:openerp.addons.mail.mail_mail:failed sending mail.mail 46#012Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.7/openerp/addons/mail/mail_mail.py", line 308, in send#012 mail_server_id=mail.mail_server_id.id, context=context)#012 File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_mail_server.py", line 476, in send_email#012 raise MailDeliveryException(_("Mail delivery failed"), msg)#012MailDeliveryException: (u'Mail Auslieferung fehlgeschlagen', u"Mail Versand schlug via SMTP Server 'smtp.office365.com' fehl.\nSMTPDataError: 550\n5.7.1 Client does not have permissions to send as this sender")
As Eladio Abquina said, it works... Finally.
In my case, company email and admin email are different. When I used google admin id with smtp.gmail.com, odoo sends any email whatever the current logged account. However, google has a limitation to use smtp email, 100 per day.
Strangly, when I use general smtp outgoing settup which are smtp.office365.com port:587 or 25 email admin id and password, it worked only on the admin account. I searched and tried all ,but only Eladio Abquina's suggestion is working.
I am going to add on his explanation....I used option3>step-by-step configuration instructions for SMTP relay from the link (https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4)
1. on office 365 >admin>domain>click primary>Exchange Online>
-copy mx domain address (which is mydomain_com.mail.protection.outlook.com)
-edit the next line and put your odoo ip address(eg.10.10.10.10)
v=spf1 ip4:10.10.10.10 include:spf.protection.out...
2. back to admin on office 365 >admin>exchange>mail flow>connector>add
from Myorganization's email server to office 365
put the odoo's ip address
-General set up > Uncheck "Use external authentication providers(OAuth)"
- outgoing smtp
Smtp server: mx endpoint of domain which copied on step1.
no username or password.
4. odoo>developer mode>setting>parameters >remove catchall and domain
Hope it helps.
As a workaround, I changed the Outgoing settings to just set-up SMTP Relay for Office365
Worked like a charm!
Make sure to set-up your connector as described here:
Hi, so I found the solution that worked for me on this site:
Do not forget to add the SPF record in your DNS to mak sure your mail does not end up in the Spam-mailbox.
ok - got a little bit closer. it works with a workaround - but unsure if this is the wanted design?
openerp sends the email under the emailadress which is registered in the user profile who logs into the system. (see /usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_mail_server.py, line 301:
email_from = email_from or tools.config.get('email_from') assert email_from, "You must either provide a sender address explicitly or configure "\ "a global sender address in the server configuration or with the "\ "--email-from startup parameter."
how can I now configure multiple users in the outgoing mail server when the SMTP server needs authentication? Is there a workaround? It would be nice having the email-adress and password configuration dialog in the user preferences?
We had the same problem and we solved with some microsoft support.
EC2 in AWS with dinamic IP
DNS Host in GoDaddy
I'm gonna take some steps from ji lee previous post that was a very good help!
On Office365 Admin console
Go to Configurations>domain>click primary>Exchange Online>
Copy mx domain address (which is mydomain_com.mail.protection.outlook.com)
Edit the next line and put your odoo ip address(eg.10.10.10.10) (v=spf1 ip4:10.10.10.10 include:spf.protection.out...) In our case we tried also use ip4:mydomain.name and a:mydomain.name because as we are using AWS is preferable to use the domain, but microsoft support team told us that only works with static IP. In our case we set the public IP of the EC2 server.
In our case the DNS record update was done in the GoDaddy admin console for DNS management; and we never saw the update in the office365 console. We checked the that the change was applied by looking at some DNS testing service like http://mxtoolbox.com/ and looking for the SPF Record Lookup
back to admin on office 365 >admin>exchange>mail flow>connector>add from Myorganization's email server to office 365 put the odoo's ip address.
Go to General set up > Uncheck "Use external authentication providers(OAuth)" (In odoo v9 is not needed)
set outgoing smtp Smtp server: mx endpoint of domain which copied on step1.
set port: 25 security: TSL(STARTTLS)
no username or password.
odoo>developer mode>setting>parameters >remove catchall and domain
At this point we have not receiving mail yet, it seems like a unblocking of the email accounts is needed. Go to https://sender.office.com. There you put the user account (email@example.com) and the IP again. An email is send to the email account (inbox) for unloking the accounts. From that moment it worked for us.
NOTE: the Odoo's user login/ email have to be a valid email account of that domain in office365.
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.
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
If "mail.catchall.alias" is not set it defaults to "postmaster-odoo".
#Because you have "postmaster", but you don't have "postmaster-odoo" on your own provider.
Hope it helps!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/5/13, 4:03 PM|
|Seen: 58536 times|
|Last updated: 6/2/17, 6:51 PM|