use Mail::Sendmail; my %mail = ( To => 'mytestaddress@aol.com', From => 'test@aol.com', Subject => 'Test 1', Message => 'Test number 1', smtp => 'smtp.comcast.com' ); sendmail(%mail) || print "Error sending mail: $Mail::Sendmail::error\n";