Click here to get back home

Mail::IMAPClient via SSL falls down...

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Mail::IMAPClient via SSL falls down... Greg G 06-01-2005
Get Chitika Premium
Posted by Greg G on June 1, 2005, 1:45 pm
Please log in for more thread options


I'm trying to get Mail::IMAPClient to work via SSL. I'm running into a
problem. Here's the output:

# ./imap_test.pl
SSL OK? 1
SSL says: * OK mailtest Sendmail Server IMAP4rev1
(2.1.5/smserver-2-1-5-build-1174)

Using Mail::IMAPClient version 2.2.9 and perl version 5.8.6 (5.008006)
'0' '' |1|
Set State : 1
Sending literal string in two parts: 1 Login "ggtest103z@mydomain.net"

then: abcdef

Sending: 1 Login "XXXXXX"

Sent 38 bytes
Can't call method "can_read" on an undefined value at
/usr/local/lib/perl5/site_perl/5.8.6/Mail/IMAPClient.pm line 1583.
#
#
then: abcdef

Sending: 1 Login "XXXXXX"

Sent 38 bytes
Can't call method "can_read" on an undefined value at
/usr/local/lib/perl5/site_perl/5.8.6/Mail/IMAPClient.pm line 1583.
#
---------------------------
Here's the code:

-------------------------
#!/usr/local/bin/perl -w

use IO::Socket::SSL;
use Mail::IMAPClient;


my $ssl = IO::Socket::SSL->new (Proto=>'tcp',
#SSL_verify_mod=>0x00,
PeerAddr=>"mailtest.mydomain.net",
PeerPort=>993);

print "SSL OK? " . (defined $ssl) . "\n";

print "SSL says: " . <$ssl> . "\n";

$imap = Mail::IMAPClient->new(Server => "mailtest.mydomain.net",
Socket => $ssl,
Timeout=>5,
User => "ggtest103z\@mydomain.net",
Password => "abcdef",
Debug => 1,
);


print STDERR " \'$@\' \'$!\' |" . (defined $imap) . "|\n";

$imap->State ($imap->Connected);
print "Set State : " . $imap->State . "\n";
$imap->login();
print "Logged in $!\n";

exit 0;

--------------------

Any idea what's happening here? I've tested the mail server and it
works fine via SSL.

Thanks.

-Greg G


Similar ThreadsPosted
Mail::IMAPClient folders($prefix) March 24, 2007, 10:18 pm
Mail::IMAPClient: access without recent flag modification November 15, 2004, 3:51 am
Mail:Sender - HTML Mail with alternatives problem July 21, 2004, 6:44 pm
Mail::Audit help plz October 26, 2005, 8:18 pm
Mail::Vacation abondoned? August 11, 2004, 3:13 pm
Mail::Audit Question August 30, 2004, 12:55 am
Mail::Message::TransferEnc February 2, 2005, 4:19 pm
E-Mail Problems - MAIL_MESSAGE March 29, 2006, 5:16 pm
Small fix for Mail-MboxParser-0.55 June 21, 2006, 12:35 pm
Send::Mail nothing happens and no errors January 25, 2007, 10:09 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap