use GMail::Checker; my $gwrapper = new GMail::Checker(); return if(!$gwrapper->login("username","password")); print "Valid account\n";