Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 119523
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: wolfsage [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.39



Subject: Ssl => 1 connection failures don't show helpful errors
Consider the following: #!/usr/bin/env perl use strict; use warnings; use Mail::IMAPClient; Mail::IMAPClient->new( Server => 'www.pcwebshop.co.uk', Port => 443, User => 'test', Password => 'test', Ssl => 1, ) or die "Failed: $@\n"; If you run it, it outputs: Failed: Unable to connect to www.pcwebshop.co.uk: I wonder if Mail::IMAPClient should be inspecting $SSL_ERROR from IO::Socket::SSL (which contains the helpful info: "hostname verification failed"). Alternatively, perhaps Mail::IMAPClient should just document that if one is using Ssl => 1, they should also load IO::Socket::SSL and inspect $SSL_ERROR. Thanks, -- Matthew Horsfall (alh)
Thanks for the report. It definitely looks like we could try a little harder here to provide a useful error.
I just made a commit that will be in the next release. It should address the request, but if not, plese let me know. Thanks for taking the time to report this! You can view the change here: https://github.com/plobbes/mail-imapclient/commit/47b68fb0590f27e354635e3b60d63b0c8e16b97e
Closing as fixed as 3.39 is released.