#!/usr/bin/python # # Save this to a file, chmod +x it, then do: # ./file.py | /usr/sbin/sendmail your@yourdomain.com # On a postfix box the email will come through corrupted with # the header line in the body. On a sendmail box it won't. print "X-test-header: tessier's test header.\r\n" print "\r\n" print "This is the body.\r\n"