def handle(self, *args, **kwargs): logger.info("Processing a received message") # Make sure to read binary data. if six.PY3: self.input_file = self.input_file.detach() input_data = self.input_file.read() process(input_data) logger.info("Completed processing a received message")
def process_mail(self): process(force_bytes(self.message.as_string(), 'utf-8'))