Skip to content
Snippets Groups Projects
Commit ab70afb3 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] mail: remove unused route


The route is no longer used but was still present in the code.
Processing email should be the job of the fetchmail server and they
should not be injected directly from outside (even if emails are
unauthenticated by design, mail servers may still have some say in the
process).

Courtesy of Alexandre Díaz

closes odoo/odoo#50053

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 6ffb6821
Branches
Tags
No related merge requests found
......@@ -98,21 +98,6 @@ class MailController(http.Controller):
url = '/web?#%s' % url_encode(url_params)
return werkzeug.utils.redirect(url)
@http.route('/mail/receive', type='json', auth='none')
def receive(self, req):
""" End-point to receive mail from an external SMTP server. """
dbs = req.jsonrequest.get('databases')
for db in dbs:
message = base64.b64decode(dbs[db])
try:
db_registry = registry(db)
with db_registry.cursor() as cr:
env = api.Environment(cr, SUPERUSER_ID, {})
env['mail.thread'].message_process(None, message)
except psycopg2.Error:
pass
return True
@http.route('/mail/read_followers', type='json', auth='user')
def read_followers(self, follower_ids, res_model):
followers = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment