use Net::IMAP::Client; my $imap = Net::IMAP::Client->new( server => 'imap.gmail.com', user => "gmailuser", pass => "gmailpass", ssl => 1, # (use SSL? default no) #ssl_verify_peer => 1, # (us...