We developed a handy tool to be used as a drop in in other projects. Pythonmailer is a command line tool to send e-mail and has the possibility to send attachments. The founding problem was that using cat file.txt | mail -s “subject” firstname.lastname@example.org was not enough and for including an attachment you had to turn yourself inside out. This hack does everything with nice switches. The first try in this project was with Perl but the dependency hell over at CPAN was HORRIBLE.
The script is easy to use but lack alot of error preventions and patches are ofc welcome, if used in a controlled environment there should be no worries.
Get the code from our mercurial repository. The license is BSD 2-clause to allow the code to run in most environments. Happy hacking!