my $msg = MIME::Lite->new( 'From' => $from, 'To' => $emailid, 'Subject' => 'Message Subject 1', 'Type' => 'multipart/mixed'); $msg->attach(Type => 'TEXT', Data => 'This is a test mail'); $msg->send( 'smtp', 'smtp.myserver.com', AuthUser=>'srikanth@myserver.com', AuthPass=>'mypass', Timeout=>60 );