f = open(filename, 'w')
f.write(data)
f.close
print('%s saved.' % filename)
self.no += 1

def run():
    foo = EmlServer(('localhost', 25), None)
try:
    asyncore.loop()
except KeyboardInterrupt:
    pass
if __name__ == '__main__':
    run()
a simple smtp server