If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process?
Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice?
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.
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
popen('/usr/bin/sendmail', 'w') is a little closer to the metal than I'd like.
If the answer is 'go write a library,' so be it 😉