Perl

getmail

downloads new messages to a folder and saves them as .eml
» getmail.pl

sendmail

send mails with perl by calling: sendmail -r recipient@foo.com -s "some subject" -t "hi there!"
» sendmail.pl