Hi Pete.
Pete Emerson wrote:
> I'm trying to get Mail::IMAPClient working with SSL. I can get it
> working
> fine without SSL. Here's my attempt:
>
> # assume $server, $port, $username, $password are defined correctly
> my $ssl = IO::Socket::SSL->new(Proto=>'tcp',
> SSL_verify_mod=>0x00,
> PeerAddr=>$server,
> PeerPort=>$port);
> my $imap = Mail::IMAPClient->new(Socket=>$ssl,User=>$username,
> Password =>$password);
I think that if you do this (presumably you've already made your SSL
connection) you have to change the client's state yourself to Connected
with the State method. Try
$imap->State ($imap->Connected);
> $imap->login();
> foreach ($imap->subscribed()) {
> print $imap->message_count($_), " messages in ", $_, "\n";
> }
> $imap->close();
>
> and it moans that I'm not connected on the $imap->login() line.
> Can anyone help me make it go? Thanks in advance.
I hope this helps. It's an age since I used IMAP.
Cheers,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]