$msg = MIME::Lite->new( From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'Helloooooo, nurse!', Data =>"How's it goin', eh?" ) ; ### Do something like this in your 'main': if ($I_DONT_HAVE_SENDMAIL) { 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