Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dlim [...] sdf.lonestar.org
Cc:
AdminCc:

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



Subject: Search method fails due to use of fcntl, which is not implemented on Win32.
OS: Win 2000 Pro 5.00.2195 sp4 Perl Version: ActivePerl 5.8.4 build 810 use Mail::IMAPClient; print "Mail::IMAPClient version: $Mail::IMAPClient::VERSION\n"; my $host = 'xxxxx'; my $user = 'yyyyy'; my $pass = 'zzzzz'; my $imap = Mail::IMAPClient->new( Server => $host, User => $user, Password => $pass, Debug => 1 ) or die "Cannot connect to $host as $user: $@\n"; $imap->select('INBOX') or die "Could not select: $@\n"; my @msgs = $imap->Search('SUBJECT',$imap->Quote("Load Information")); $imap->disconnect or warn "Could not disconnect: $@\n"; print "Disconnected!\n"; Debug output: Using Mail::IMAPClient version 2.2.9 and perl version 5.8.4 (5.008004) Mail::IMAPClient not using Fast_IO; not available on this platform at IMAP-test.pl line 7 Read: * OK GroupWise IMAP4rev1 Server Ready Connect: Received this from readline: 0/OUTPUT/* OK GroupWise IMAP4rev1 Server Ready Sending literal string in two parts: 1 Login "yyyyy" {8} then: zzzzz Sending: 1 Login "XXXXXXXX" {8} Sent 20 bytes Read: + Ready Sending: zzzzz Sent 10 bytes Read: 1 OK LOGIN completed Sending: 2 SELECT INBOX Sent 16 bytes Read: * 2002 EXISTS Read: * 0 RECENT * OK [UNSEEN 1523] * OK [UIDVALIDITY 1105978690] * OK [UIDNEXT 2003] * FLAGS (\Answered \Flagged \Deleted \Draft \Seen) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)] 2 OK [READ-WRITE] SELECT completed Autoloading: Search SUBJECT "Load Information" Sending: 3 Search SUBJECT "Load Information" Sent 37 bytes Read: * SEARCH 718 751 805 1230 1247 1249 1266 1277 1288 1289 1290 1292 1293 1294 1295 1430 1437 1438 1439 1457 1460 1573 1602 1633 1673 1674 1675 1691 1705 1738 1764 1814 1847 1901 1948 1949 1966 1974 1984 2002 3 OK SEARCH completed Error in search: Your vendor has not defined Fcntl macro F_GETFL, used at c:/Perl/site/lib/Mail/IMAPClient.pm line 69. Sending: 4 LOGOUT Sent 10 bytes Read: * BYE IMAP4rev1 Server Disconnect 4 OK LOGOUT completed
[guest - Mon Jan 17 16:18:12 2005]: Show quoted text
> OS: Win 2000 Pro 5.00.2195 sp4 > Perl Version: ActivePerl 5.8.4 build 810 > > use Mail::IMAPClient; > > print "Mail::IMAPClient version: $Mail::IMAPClient::VERSION\n"; > my $host = 'xxxxx'; > my $user = 'yyyyy'; > my $pass = 'zzzzz'; > my $imap = Mail::IMAPClient->new( > Server => $host, > User => $user, > Password => $pass, > Debug => 1 > ) > or die "Cannot connect to $host as $user: $@\n"; > > $imap->select('INBOX') or die "Could not select: $@\n"; > > my @msgs = $imap->Search('SUBJECT',$imap->Quote("Load Information")); > > $imap->disconnect or warn "Could not disconnect: $@\n"; > print "Disconnected!\n"; > > Debug output: > Using Mail::IMAPClient version 2.2.9 and perl version 5.8.4 (5.008004) > Mail::IMAPClient not using Fast_IO; not available on this platform at > IMAP-test.pl line 7 > Read: * OK GroupWise IMAP4rev1 Server Ready > > Connect: Received this from readline: 0/OUTPUT/* OK GroupWise > IMAP4rev1 Server Ready > > Sending literal string in two parts: 1 Login "yyyyy" {8} > > then: zzzzz > > Sending: 1 Login "XXXXXXXX" {8} > > Sent 20 bytes > Read: + Ready > > Sending: zzzzz > > Sent 10 bytes > Read: 1 OK LOGIN completed > > Sending: 2 SELECT INBOX > > Sent 16 bytes > Read: * 2002 EXISTS > > Read: * 0 RECENT > * OK [UNSEEN 1523] > * OK [UIDVALIDITY 1105978690] > * OK [UIDNEXT 2003] > * FLAGS (\Answered \Flagged \Deleted \Draft \Seen) > * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Draft \Seen \*)] > 2 OK [READ-WRITE] SELECT completed > > Autoloading: Search SUBJECT "Load Information" > Sending: 3 Search SUBJECT "Load Information" > > Sent 37 bytes > Read: * SEARCH 718 751 805 1230 1247 1249 1266 1277 1288 1289 1290 > 1292 1293 1294 1295 1430 1437 1438 1439 1457 1460 1573 1602 1633 > 1673 1674 1675 1691 1705 1738 1764 1814 1847 1901 1948 1949 1966 > 1974 1984 2002 > 3 OK SEARCH completed > > Error in search: Your vendor has not defined Fcntl macro F_GETFL, used > at c:/Perl/site/lib/Mail/IMAPClient.pm line 69. > > Sending: 4 LOGOUT > > Sent 10 bytes > Read: * BYE IMAP4rev1 Server Disconnect > 4 OK LOGOUT completed
sorry, missing two lines from test code: if ($@) { warn "Error in search: $@\n"; } immediately following the line my @msgs = $imap->Search...
Search did work (although you should use 'search'). The $@ content was the result of the eval{} which avoids the crash on Windows... however, it should have been cleaned. Will be done in 2.99_02