http://qs321.pair.com?node_id=690894


in reply to Simple SMTP email within script...

Since you're so close already, your Perl script could simply compose the message in a temp file and then call a Unix utility like "mailx".