I figured out the issue --- imap.gmail.com has both ah A and AAAA DNS
record (IPv4 and IPv6).
The server that it was running on only has IPv4 internet connectivity,
but has an IPv6 administrative backplane. Therefore, the module was
attempting to connect using the IPv6 address and failing. Not sure if
this is how the module should work, but I think modifications to
better handle IPv6 might be in order.
On Thu, Jun 28, 2012 at 12:21 PM, Bugs in Net-IMAP-Client via RT
<bug-Net-IMAP-Client@rt.cpan.org> wrote:
Show quoted text>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "Bug in Net::IMAP::Client preventing IMAP connection to GMail",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket has been
> assigned an ID of [rt.cpan.org #78101]. Your ticket is accessible
> on the web at:
>
>
https://rt.cpan.org/Ticket/Display.html?id=78101
>
> Please include the string:
>
> [rt.cpan.org #78101]
>
> in the subject line of all future correspondence about this issue. To do so,
> you may reply to this message.
>
> Thank you,
> bug-Net-IMAP-Client@rt.cpan.org
>
> -------------------------------------------------------------------------
> Distribution: Net-IMAP-Client-0.9501
> Perl Version: 5.10.1
> OS: CentOS 6.2
>
> I am trying to connect to a GMail IMAP account but my code does not
> run past the constructor and dies.
>
> my $imapcxn = Net::IMAP::Client->new(
> server => "imap.gmail.com",
> user => "useracct@gmail.com",
> pass => "yourpass",
> ssl => 1,
> port => 993
> ) or die "Couldn't connect to IMAP Server"
>
> This code yields at runtime:
> Couldn't connect to IMAP Server at xxx.pl at line xx.
>
> Not sure what needs to be done internally to fix this...
>
>
> patrick correa
> patrickc81@gmail.com
>