2014-11-06 19:00:52 +01:00
|
|
|
#!perl -w
|
|
|
|
use Test::More tests => 2;
|
|
|
|
use strict;
|
|
|
|
use lib 't';
|
|
|
|
|
|
|
|
use_ok('Net::IMAP::Simple');
|
|
|
|
|
|
|
|
sub auth_imap {
|
|
|
|
|
2014-11-15 14:40:34 +01:00
|
|
|
use Net::IMAP::Simple::SSL;
|
2014-11-06 19:00:52 +01:00
|
|
|
|
2014-11-15 14:40:34 +01:00
|
|
|
my ($imaphost, $imapport, $imapserver);
|
2014-11-06 19:00:52 +01:00
|
|
|
|
2014-11-15 14:40:34 +01:00
|
|
|
$imaphost = "imap.gmail.com";
|
|
|
|
$imapport = "993";
|
|
|
|
$imapserver = "$imaphost:$imapport";
|
2014-11-06 19:00:52 +01:00
|
|
|
|
2014-11-15 14:40:34 +01:00
|
|
|
my $server = Net::IMAP::Simple->new($imapserver, use_ssl => 1,)
|
|
|
|
or return ("auth_imap - could not connect to $imapserver");
|
|
|
|
sleep 1;
|
|
|
|
$server->quit;
|
2014-11-06 19:00:52 +01:00
|
|
|
}
|
|
|
|
|
2014-11-06 21:37:40 +01:00
|
|
|
ok(auth_imap, "auth_imap, connected to imap.gmail.com for a sec");
|