Why not use
Net::SMTP or
Mail::Mailer? It'll make your code more portable, and you can avoid the hassles of exec'ing external programs.
While NT based, there's a whole discussion starting at node
Sending mail on NT, that's applicable to what you're trying to do.
--Chris
e-mail jcwren