if (defined $arg{User}) { $obj->auth($arg{User},$arg{Password}); } #### MIME::Lite->send('smtp', $out_smtp , Port =>$smtp_port , Timeout=>60 , Debug => $debug , Hello => 'domain.com', User => 'trs80', Password => 'blah' );