MCPcopy Index your code
hub / github.com/python/cpython / process_message

Method process_message

Lib/test/support/smtpd.py:733–745  ·  view source on GitHub ↗
(self, peer, mailfrom, rcpttos, data)

Source from the content-addressed store, hash-verified

731 super(PureProxy, self).__init__(*args, **kwargs)
732
733 def process_message(self, peer, mailfrom, rcpttos, data):
734 lines = data.split('\n')
735 # Look for the last header
736 i = 0
737 for line in lines:
738 if not line:
739 break
740 i += 1
741 lines.insert(i, 'X-Peer: %s' % peer[0])
742 data = NEWLINE.join(lines)
743 refused = self._deliver(mailfrom, rcpttos, data)
744 # TBD: what to do with refused addresses?
745 print('we got some refusals:', refused, file=DEBUGSTREAM)
746
747 def _deliver(self, mailfrom, rcpttos, data):
748 import smtplib

Callers 1

found_terminatorMethod · 0.45

Calls 4

_deliverMethod · 0.95
splitMethod · 0.45
insertMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected