Sending mail via sendmail from python
Posted
by Nate
on Stack Overflow
See other posts from Stack Overflow
or by Nate
Published on 2008-09-16T15:46:43Z
Indexed on
2010/05/27
1:41 UTC
Read the original article
Hit count: 251
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 ;-)
© Stack Overflow or respective owner