in reply to
Sending email using qmail
You can open a pipe to qmail-inject and write to it, just like sendmail. Or you can use
Email::Send::Qmail
which does (some) dirty work for you.
Comment on
Re: Sending email using qmail
In Section
Seekers of Perl Wisdom