in reply to Getting the exit status from a pm

Hi,

Don't you need to set the principal method of sending mail beforehand?

MIME::Lite->send('sendmail', "d:\\programs\\sendmail.exe"); ... $msg = MIME::Lite->new(...);

On unix this is the default:

MIME::Lite->send("sendmail", "/usr/lib/sendmail -t -oi -oem");

Now about your code, if you change the if to a return you should receive the result from the $msg->send() in exit (&main(@ARGV) ? 0 : -1);.

--
if ( 1 ) { $postman->ring() for (1..2); }