Receiving email with SMTPServer in python:
问题 I have a small application under Linux to receive an email with the use of smtpd.SMTPServer. Here is the small test code: class CustomSMTPServer(smtpd.SMTPServer): def process_message(self, peer, mailfrom, rcpttos, data): print 'Receiving message from:', peer print 'Message addressed from:', mailfrom print 'Message addressed to :', rcpttos print 'Message length :', len(data) return server = CustomSMTPServer(('0.0.0.0', 25), None) asyncore.loop() I have the following issues: (1) When using