This question has been flagged
8 Replies
9620 Views

Version 8.0-20160426
I'm having a problem where upon clicking a "Send email" button in Odoo, in that the mail that is being sent shows the circle "waiting" logo and takes minutes to send leaving the user unable to work further in Odoo until the mail has been sent.

This only seems to happen in about one in three emails, but it's significant enough to be a problem for my users.

A little background 

I have Odoo hooked up to my Office 365 SMTP.

Following some of the advice given in the following thread, the steps below are how I have configured Odoo to use Office 365's SMTP relay: https://www.odoo.com/forum/help-1/question/outgoing-mail-server-not-working-with-smtp-office365-com-35676
Supplemented by using Option 3 from the Office 365 guide here:
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 the mx domain address (which should look something like: mydomain_com.mail.protection.outlook.com)
    This is the name of my outgoing SMTP server for Odoo - to be pasted later

  2. Copy the recommended SPF rule and add in my Odoo server's IP, then add SPF record to my DNS records
     v=spf1 ip4:10.10.10.10 include:spf.protection.out...

  3. Back to admin on Office 365 >admin>exchange>mail flow>connector>add
    Add a new rule From My organization's email server to office 365
    Add the Odoo server's ip address

  4. On Odoo Settings>Config>General settings:
    Uncheck "Use external authentication providers..."

  5. On Odoo Settings>Technical>Outgoing Mail Servers
    Smtp server: mx endpoint of domain which copied on step1.
    Port: 25
    Security: TSL(STARTTLS)
    No username or password required

  6. In Odoo go to Settings>Technical>System Parameters - Then remove mail.catchall.domain and mail.catchall.alias 

My messages are all being sent - there are no issues there, but as I say,  Odoo seems to regularly hang when sending messages and it's driving my user's insane.  

I've been over the settings time and time again to ensure everything is set up correctly, but I can't see any reason why this might be happening. I'm hoping someone here might be able to shed some light on the issue!

Avatar
Discard
Author

It is also worth mentioning that in sending test message to myself, I actually receive the test email in my inbox as Odoo is still sitting there, hanging, telling me to go and make a coffee. So it's like it has done the hard work, but for some reason it still wants to make me wait. I'm not sure why.

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
Author Best Answer

Okay, ultimately I didn't find a bonafide solution to this problem within Office 365.

What I did do to solve my problem in the end was to switch and use the Amazon Web Server, SES service to set-up an SMTP server.

It was actually 10 times easier than using Office 365, with less steps to set-up and works with no issues whatsoever.  
I've pasted in a link to set-up instructions below. 

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html

The only thing to be aware of is that when you paste in the settings to Odoo, you need to use SSL/TLS, rather than TLS (STARTLS) - both will work in testing, but in production only SSL/TLS works every time.


Mohit, if you can upvote this reply I'll try to help you (I only have 7 Karma and need 8 to reply to your message with a comment).

Avatar
Discard

Michael,

I did it. Plz help me. Thank u very much in advance

Author

Thank you... I replied to your question below as a comment. I hope it helps.

Best Answer

Hi Michael, 

Can you please explain in detail about these steps? I am unable to find some of these options in Office 365 and can't send mails from Odoo:

  1. On Office 365 >admin>domain>click primary>Exchange Online>
    Copy the mx domain address (which should look something like: mydomain_com.mail.protection.outlook.com)
    This is the name of my outgoing SMTP server for Odoo - to be pasted later

  2. Copy the recommended SPF rule and add in my Odoo server's IP, then add SPF record to my DNS records
     v=spf1 ip4:10.10.10.10 include:spf.protection.out...

Please help me. I am stuck in Office 365. 

Thanks in advance.

Avatar
Discard
Author

Hi Mohit,

I need to change this bit of my original post as I think I may have copied it down wrong.

Anyway, this:

On Office 365 > admin > domain > click primary > Exchange Online >

should be this:

On Office 365 > admin > settings > domains > Click on the domain you wish to use for emails

If you follow the above path within your Office 365 login, you should be able to get the required MX record information that you will need.

I will try to go back and edit my original question to reflect this.

As I say in my reply below, Office 365 didn't work very well for me, so I ended up using AWS SME, so if you're having further problems it might be worth looking at creating an AWS account, or trying a different SMTP server you can send from. I hope this helps?

After following your steps I found this: "my-domain-name.onmocrosoft.com"

Is this MX record that you are talking about?