4

I am trying to send emails from my Odoo 10 installation. For this I have configured the outgoing mail server with Gmail SMTP as follows:

SMTP Server: smtp.gmail.com
SMTP Port: 465
Priority: 10
Connection Security: SSL/TLS

I have also configured my Gmail account to accept less secure connections from outside and when I run the test from Odoo's email configuration menu I get the following message:

Connection Test Succeeded! Everything seems properly set up!

BUT: If I try to send a real mail with Odoo I get the following error reason:

Mail Delivery Failed
Mail delivery failed via SMTP server 'localhost'.
error: 111
Connection refused

I don't know what to do, I searched for it on the internet but found nothing. Hope somebody can help me. Many thanks in advance.

sunwarr10r
  • 4,420
  • 8
  • 54
  • 109

1 Answers1

4

From the error its clear that Odoo is trying to send emails using "SMTP server 'localhost'".

By default Odoo will create a localhost server in outgoing mail configuration menu. So you must set the "Priority" field in the form. Set the GMail server priority as "1"and localhost as "2" or any other value.

Priority: The priority of your mail server. The lower the number the higher the priority. This will mean that the e-mail server with the lowest number will be used the most.

vwvw
  • 372
  • 4
  • 16
Pravitha V
  • 3,308
  • 4
  • 33
  • 51
  • This is definitely a possibility. However the 'localhost' server could also have been modified to point at google for smtp. If saitam did not change the name of the server ie 'localhost' then it could still be an issue with firewall settings or authentication with google. – Phillip Stack Jan 28 '17 at 15:30
  • Thank you it works. I didn't change the priority because I faced errors the last time I did, but I think there were other reasons responsible for this. – sunwarr10r Jan 29 '17 at 14:02
  • I can now send emails by going to setting > technical > email > emails > create. But unfortunately I still can't send emails from the sale order or invoice form by clicking "Send by Email" I get no error, but also nothing happens – sunwarr10r Jan 29 '17 at 14:04