in reply to Re^2: Sending email using qmail
in thread Sending email using qmail

Have you tried looking into the MIME::Lite documentation and adapting the examples there?