Mail::IMAPClient and Net::SSLeay

Discussion in 'Perl Misc' started by Josef Moellers, Jul 26, 2004.

  1. 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
    Josef Moellers, Jul 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francesc Guasch

    Mail::IMAPClient::BodyStructure tests fail

    Francesc Guasch, Aug 27, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    185
    Francesc Guasch
    Aug 27, 2003
  2. Zoong Pham

    help with Mail::IMAPClient-2.2.9

    Zoong Pham, Nov 6, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    110
    Sisyphus
    Nov 6, 2003
  3. Greg G

    Mail::IMAPClient via SSL

    Greg G, May 25, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    163
    Tad McClellan
    May 31, 2005
  4. Replies:
    0
    Views:
    97
  5. Replies:
    3
    Views:
    108
    Thrill5
    Aug 29, 2006
Loading...

Share This Page