I'm trying to use the Email marketing module in Odoo 16 Community on a VPS, with a custom mail server. When I go to Incoming and Outgoing Mail and test the connection it tells me that a connection has been established.
But when I go to send an email from the module it won't let me. And when I try to send it from Settings/Technical/Emails it gives me this error:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/http.py", line 1632, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo/odoo-server/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo/odoo-server/odoo/http.py", line 1659, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo-server/odoo/http.py", line 1863, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/odoo-server/addons/website/models/ir_http.py", line 237, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo-server/odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/odoo-server/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo-server/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo-server/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo-server/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo-server/addons/mail/models/mail_mail.py", line 449, in send
smtp_session.quit()
File "/usr/lib/python3.10/smtplib.py", line 1004, in quit
res = self.docmd("quit")
File "/usr/lib/python3.10/smtplib.py", line 431, in docmd
self.putcmd(cmd, args)
File "/usr/lib/python3.10/smtplib.py", line 378, in putcmd
self.send(f'{s}{CRLF}')
File "/usr/lib/python3.10/smtplib.py", line 365, in send
raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
The above server error caused the following client error:
RPC_ERROR://dominio.com/web/assets/1939-d73ea71/web.assets_backend.min.js:995:163)
at XMLHttpRequest.<anonymous> (https://dominio.com/web/assets/1939-d73ea71/web.assets_backend.min.js:1003:13)
What could it be?
You need to configure it properly including alias in General Settings.