Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Mail::IMAPClient and Net::SSLeay

Reply
Thread Tools

Mail::IMAPClient and Net::SSLeay

 
 
Josef Moellers
Guest
Posts: n/a
 
      07-26-2004
Hi,

I use Mail::IMAPClient version 2.2.9 and perl-Net_SSLeay-1.23-51

I need to combine Mail::IMAPClient and Net::SSLeay to retrieve mail via
imaps. I try
socket (S, &AF_INET, &SOCK_STREAM, 0);
connect (S, $dest_serv_params);
select (S); $| = 1; select (STDOUT);
$ctx = Net::SSLeay::CTX_new();
Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL);
$ssl = Net::SSLeay::new($ctx);
Net::SSLeay::set_fd($ssl, fileno(S));
Net::SSLeay::connect($ssl);
# Then I need to
$resp = Net::SSLeay::read($ssl);
Net::SSLeay::write($ssl, "A01 LOGIN $imap_user $imap_pass\r\n");
$resp = Net::SSLeay::read($ssl);
$connection = Mail::IMAPClient->new(
# User => $imap_user,
# Password => $imap_pass,
);
$connection->Socket(\*S);
$connection->State($connection->Authenticated);

After that, however, every use of any function in Mail::IMAPClient
fails, e.g.
$connection->select("INBOX");

What am I missing?

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments