This question has been flagged
1 Reply
5160 Views

I want to configure the outgoing mail through the odoo.conf file, I have this:
odoo.conf

[options]

smtp_password=mypassword 
smtp_port=465
smtp_server=smtp.gmail.com 
smtp_ssl=True
smtp_user=example@gsuitemail.com
email_from=example@gsuitemail.com

If I configure the same parameters in the Preferences it works, is there any way to make it work from the conf file?
The email is provided by Gsuite, and the corresponding configuration was made.

Avatar
Discard
Best Answer

Hi,

Try the below

smtp_server = localhost
smtp_user = False
smtp_password = False
smtp_ssl = False
email_from = "TKL-Odoo-Server@example.com"
smtp_port = 25

Here you see the sample odoo.conf and there is session for setting email

https://gist.github.com/Guidoom/d5db0a76ce669b139271a528a8a2a27f

# Email Settings#
#-----------------------------------------------------------------------------#
Specify the SMTP server for sending email (default localhost).
#-----------------------------------------------------------------------------
smtp_server = localhost
#-----------------------------------------------------------------------------#
Specify the SMTP user for sending email (default False).#-----------------------------------------------------------------------------smtp_user = False
#-----------------------------------------------------------------------------#
Specify the SMTP password for sending email (default False)
.#-----------------------------------------------------------------------------
smtp_password = False
#-----------------------------------------------------------------------------#
 if True, SMTP connections will be encrypted with SSL (STARTTLS)#-----------------------------------------------------------------------------smtp_ssl = False
#-----------------------------------------------------------------------------#
Specify the SMTP email address for sending email
#-----------------------------------------------------------------------------
email_from = "TKL-Odoo-Server@example.com"
#-----------------------------------------------------------------------------#
 Specify the SMTP port
#-----------------------------------------------------------------------------
smtp_port = 25

Hope it helps

Avatar
Discard

Do such settings overrule the settings in Settings/Technical/Outgoing Mailserver?