in reply to Sendmail + perl?

ActiveState's PureMessage is exactly what you descibed: a Perl interface to Sendmail. It is a commercial product though, so if you were looking for an open source solution, this is not it.