Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: ron [...] virtualbuilding.nl
Cc:
AdminCc:

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



From: "Ron Rademaker" <ron [...] virtualbuilding.nl>
To: <bug-Mail-IMAPClient [...] rt.cpan.org>
Subject: Looks like pretty much none of the methods is working
Date: Thu, 6 Nov 2003 11:55:47 +0100
Hello, It looks like none of the methods in Mail::IMAPClient are working, I'm probably doing something wrong... I guess this bug can be fixed by improving documentation :-) Here are some examples (in all, $host, $id and $password are set ok...): Sample script: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); $imap->fetch_hash("INTERNALDATE"); $imap->logout; Result: Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok Autoloading: fetch_hash INTERNALDATE Sending: 3 fetch_hash INTERNALDATE Sent 27 bytes Read: 3 NO Error in IMAP command received by server. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed Sample script 2: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); $imap->messages; $imap->logout; Result: Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok messages is all lower-case. May conflict with future methods. Change method name to be mixed case or all upper case to ensure upward compatability at ./Email.pm line 27 Sending: 3 messages Sent 12 bytes Read: 3 NO Error in IMAP command received by server. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed Sample script 3: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); my @msg = $imap->Search("ALL"); foreach (@msg) { print "Message: " . $_ . "\n"; } $imap->logout; Result Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok Autoloading: Search ALL Sending: 3 Search ALL Sent 14 bytes Read: * SEARCH 1 2 3 OK SEARCH done. Message: * SEARCH 1 2 Message: 3 OK SEARCH done. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed I could go on a while longer, but I don't think that'll be useful, guess you get te point. Anything between the Select and the logout fails. (I also tried messages as Messages... doesn't matter). It always gives the <tagid> NO Error in IMAP command received by server. Last sample doesn't give an error... but @msg doesn't contain the information one (at least I) would expect, I'd expect data I can use in something like get_header or get_envelope. Kind regards, Ron Rademaker
From: "Ron Rademaker" <ron [...] virtualbuilding.nl>
To: <bug-Mail-IMAPClient [...] rt.cpan.org>
Subject: RE: [cpan #4309] AutoReply: Looks like pretty much none of the methods is working
Date: Thu, 6 Nov 2003 12:25:53 +0100
RT-Send-Cc:
I found out it was a version problem.... Suggestion add lines like: This method was added in version x.x.x in the documentation. Reduce this bug to wishlist please. Show quoted text
-----Original Message----- From: Mail-IMAPClient [mailto:bug-Mail-IMAPClient@rt.cpan.org] Sent: 06 November 2003 11:57 To: ron@virtualbuilding.nl Subject: [cpan #4309] AutoReply: Looks like pretty much none of the methods is working Greetings, This message has been automatically generated in response to your bug report about Mail-IMAPClient, a summary of which appears below. There is no need to reply to this message right now. Your bug in Mail-IMAPClient has been assigned an ID of [cpan #4309]. Please include the string: [cpan #4309] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-Mail-IMAPClient@rt.cpan.org ------------------------------------------------------------------------ - Hello, It looks like none of the methods in Mail::IMAPClient are working, I'm probably doing something wrong... I guess this bug can be fixed by improving documentation :-) Here are some examples (in all, $host, $id and $password are set ok...): Sample script: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); $imap->fetch_hash("INTERNALDATE"); $imap->logout; Result: Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok Autoloading: fetch_hash INTERNALDATE Sending: 3 fetch_hash INTERNALDATE Sent 27 bytes Read: 3 NO Error in IMAP command received by server. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed Sample script 2: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); $imap->messages; $imap->logout; Result: Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok messages is all lower-case. May conflict with future methods. Change method name to be mixed case or all upper case to ensure upward compatability at ./Email.pm line 27 Sending: 3 messages Sent 12 bytes Read: 3 NO Error in IMAP command received by server. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed Sample script 3: #!/usr/bin/perl -w use strict; use Mail::IMAPClient::BodyStructure; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => $host,User => $id,Password => $password) or die "Cannot connect to $host as $id: $@"; $imap->Debug(1); $imap->Select("INBOX"); my @msg = $imap->Search("ALL"); foreach (@msg) { print "Message: " . $_ . "\n"; } $imap->logout; Result Autoloading: Select INBOX Sending: 2 Select INBOX Sent 16 bytes Read: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited * 2 EXISTS * 0 RECENT * OK [UIDVALIDITY 1066745093] Ok 2 OK [READ-WRITE] Ok Autoloading: Search ALL Sending: 3 Search ALL Sent 14 bytes Read: * SEARCH 1 2 3 OK SEARCH done. Message: * SEARCH 1 2 Message: 3 OK SEARCH done. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 4 OK LOGOUT completed I could go on a while longer, but I don't think that'll be useful, guess you get te point. Anything between the Select and the logout fails. (I also tried messages as Messages... doesn't matter). It always gives the <tagid> NO Error in IMAP command received by server. Last sample doesn't give an error... but @msg doesn't contain the information one (at least I) would expect, I'd expect data I can use in something like get_header or get_envelope. Kind regards, Ron Rademaker
new maintainer. Only few (Perl) modules will tell you in which version what was added. Part of the Open Source filosophy is that you can always upgrade to the latest version for free... So always start developing with the latest version!