| 1 | from test.support import smtpd
|
| 2 | from test.support import asyncore
|
| 3 |
|
| 4 | class FakeSMTPServer(smtpd.SMTPServer):
|
| 5 |
|
| 6 |
|
| 7 | def __init__(*args, **kwargs):
|
| 8 | smtpd.SMTPServer.__init__(*args, **kwargs)
|
| 9 |
|
| 10 | def process_message(*args, **kwargs):
|
| 11 | pass
|
| 12 |
|
| 13 | if __name__ == "__main__":
|
| 14 | smtp_server = FakeSMTPServer(('127.0.0.1', 2525), None)
|
| 15 | try:
|
| 16 | asyncore.loop(timeout=1, count=30)
|
| 17 | except KeyboardInterrupt:
|
| 18 | smtp_server.close()
|