title: Sending mail via sendmail from python
body: <p>If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process?</p>
  
  <p>Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice?</p>
  
  <p>I'll be running this script on a bunch of unix hosts, only some of which are listening on localhost:25; a few of these are part of embedded systems and can't be set up to accept SMTP.</p>
  
  <p>As part of Good Practice, I'd really like to have the library take care of header injection vulnerabilities itself -- so just dumping a string to <code>popen('/usr/bin/sendmail', 'w')</code> is a little closer to the metal than I'd like.</p>
  
  <p>If the answer is 'go write a library,' so be it ;-)</p>