original_docstring:  End-point to receive mail from an external SMTP server. 
docstring: End-point to receive mail from an external SMTP server.
docstring_tokens: End - point to receive mail from an external SMTP server .
code: 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
code_tokens: def receive ( self , req ) : 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
short_docstring: End-point to receive mail from an external SMTP server.
short_docstring_tokens: End - point to receive mail from an external SMTP server .
comment: """ End-point to receive mail from an external SMTP server. """