Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 406 Bytes
import sys
import smtplib
def output((code, msg)):
sys.stdout.write('%s %s\n' % (code, msg))
sys.stdout.flush()
smtp = smtplib.SMTP('localhost', 2500)
output(smtp.ehlo('moon.localdomain'))
print smtp.esmtp_features
output(smtp.mail('Damien Churchill <damoxc@gmail.com>'))
output(smtp.rcpt('Damien Churchill <damoxc@damoxc.net>'))
output(smtp.data('Subject: Testing\n\nTest'))
output(smtp.quit())
Something went wrong with that request. Please try again.