Spaces is message ids
"Rich Caller" <[email protected]> Fri, 21 May 2004 10:52:05 +0000
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
I've only just started looking at these modules while looking into a problem with perlwebmail and am not an expert in mail.
What was happening was that some messages where not being read properly. A bit of investigation indicated that these where messages where the message id contained a space and was not contained in <> and that the point of failure was the find method. A quick check of the relevent messages seemed to indicate that spaces where being replaces by +.
So I modified the find function in Mail::Box to be....
sub find($)
{ my ($self, $msgid) = (shift, shift);
my $msgids = $self->{MB_msgid};
if($msgid =~ m/\<([^>]*)\>/s)
{ $msgid = $1;
$msgid =~ s/\s//gs;
}
else
{
$msgid =~ s/\s/+/gs;
}
$self->scanForMessages(undef, $msgid, 'EVER', 'ALL')
unless exists $msgids->{$msgid};
$msgids->{$msgid};
}
Thoughts, comments, better fixes please.....
Rich Caller
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm