Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: Nathan.Bailey [...] its.monash.edu
Cc:
AdminCc:

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



Date: Tue, 03 Jan 2006 16:51:30 +1100
From: Nathan Bailey <Nathan.Bailey [...] its.monash.edu>
Subject: Zero-length body part causes bodypart_string() to fail?
To: bug-Mail-IMAPClient [...] rt.cpan.org
I can provide more debugging info if required, but I suspect I may have identified the cause already. There is a short (zero)? text/plain part to the message below (mixed output from my script and $imap->Debug(1)). IMAP seems to think the fetch was successful ('OK'), but bodypart_string fails, with no error message (blank $@ after the colon). My version of Mail::IMAPClient says: # $Id: IMAPClient.pm,v 20001010.20 2003/06/13 18:30:55 dkernen Exp $ $Mail::IMAPClient::VERSION = '2.2.9'; This code (lines 592..595 of Mail::IMAPClient) seems to assume that there will be a data in the return (which in this case, there isn't) foreach my $result (@{$self->{"History"}{$self->Transaction}}) { $string .= $result->[DATA] if defined($result) and $self->_is_literal($result) ; } but since $string is initialised to an empty string (line 590), I can't see why this is actually failing... thanks, Nathan PS: Is there any documentation for Mail::IMAPClient::BodyStructure? I am using it by parsing the object, which seems a little brutal, because I'm not sure what methods I'm supposed to be using :-) ======= $imap->Debug(1) transcript: Sending: 6 CAPABILITY Sent 14 bytes Read: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN LANGUAGE STARTTLS XSENDER X-NETSCAPE XSERVERINFO 6 OK Completed Sending: 7 FETCH 186 BODY[1] Sent 21 bytes Read: * 186 FETCH (BODY[1] "") 7 OK Completed Could not get bodypart string (1) for 186: Trying body_string(186) instead Sending: 8 FETCH 186 BODY[TEXT] Sent 24 bytes LITERAL: received literal in line * 186 FETCH (BODY[TEXT] of length 81451; atte mpting to retrieve from the 1415 bytes in: This is a multi-part message in MIME format. --Boundary_(ID_6PD3KJOxYTJ3B8LtHikoGA) Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7BIT --Boundary_(ID_6PD3KJOxYTJ3B8LtHikoGA) Content-type: message/rfc822; name="Approach for Monash" ...
New maintainer On Tue Jan 03 00:53:12 2006, Nathan.Bailey@its.monash.edu wrote: Show quoted text
> I can provide more debugging info if required, but I suspect I may > have > identified the cause already. There is a short (zero)? text/plain > part > to the message below (mixed output from my script and $imap-
> >Debug(1)).
> > IMAP seems to think the fetch was successful ('OK'), but > bodypart_string fails, with no error message (blank $@ after the > colon).
how do you test"failing"? Show quoted text
> My version of Mail::IMAPClient says: > # $Id: IMAPClient.pm,v 20001010.20 2003/06/13 18:30:55 dkernen Exp $ > $Mail::IMAPClient::VERSION = '2.2.9'; > > This code (lines 592..595 of Mail::IMAPClient) seems to assume that > there will be a data in the return (which in this case, there isn't) > foreach my $result (@{$self->{"History"}{$self-
> >Transaction}}) {
> $string .= $result->[DATA] > if defined($result) and $self->_is_literal($result) ; > } > but since $string is initialised to an empty string (line 590), I > can't > see why this is actually failing... > > thanks, > Nathan > PS: Is there any documentation for Mail::IMAPClient::BodyStructure? I > am using it by parsing the object, which seems a little brutal, > because > I'm not sure what methods I'm supposed to be using :-)
see get_bodystructure()
CC: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Subject: Re: [rt.cpan.org #16876] Zero-length body part causes bodypart_string() to fail?
Date: Tue, 23 Oct 2007 14:53:47 +1000
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Nathan Bailey <Nathan.Bailey [...] its.monash.edu>
Wow. I think I'm going to have to do some serious digging to find out what script I was working on and what the issues were! :-) But thanks for following up! re, N On 23/10/2007, at 8:01 AM, Mark Overmeer via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=16876 > > > New maintainer > > On Tue Jan 03 00:53:12 2006, Nathan.Bailey@its.monash.edu wrote:
>> I can provide more debugging info if required, but I suspect I may >> have >> identified the cause already. There is a short (zero)? text/plain >> part >> to the message below (mixed output from my script and $imap-
>>> Debug(1)).
>> >> IMAP seems to think the fetch was successful ('OK'), but >> bodypart_string fails, with no error message (blank $@ after the >> colon).
> > how do you test"failing"? >
>> My version of Mail::IMAPClient says: >> # $Id: IMAPClient.pm,v 20001010.20 2003/06/13 18:30:55 dkernen Exp $ >> $Mail::IMAPClient::VERSION = '2.2.9'; >> >> This code (lines 592..595 of Mail::IMAPClient) seems to assume that >> there will be a data in the return (which in this case, there isn't) >> foreach my $result (@{$self->{"History"}{$self-
>>> Transaction}}) {
>> $string .= $result->[DATA] >> if defined($result) and $self->_is_literal($result) ; >> } >> but since $string is initialised to an empty string (line 590), I >> can't >> see why this is actually failing... >> >> thanks, >> Nathan >> PS: Is there any documentation for >> Mail::IMAPClient::BodyStructure? I >> am using it by parsing the object, which seems a little brutal, >> because >> I'm not sure what methods I'm supposed to be using :-)
> > see get_bodystructure()
Probably lost in history, closing ticket