$msg = MIME::Lite->new( From =>$from, To =>$to, Cc =>'', Subject =>$subject, Data => $body ); $msg->send(); ######################### # if you don't have sendmail on your system # Change how messages are sent ### Do something like this in your 'main': # MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60); ### Now this will do the right thing: # $msg->send;## will now use Net::SMTP as shown above