Mail-IMAPClient
view release on metacpan or search on metacpan
just a part of a part (or a part of a subpart for that matter...) I did
this so I could verify BodyStructure's parts method by fetching the first
few bytes of a part (just to prove that the part has a valid part number).
Added new tests to test the migrate function and to do more thorough
testing of the BodyStructure stuff. Also added a test to make sure that
searches that come up empty handed return an undef instead of an empty
array (reference), regardless of context. Which reminds me...
Fixed a bug in which searches that don't find any hits would return a
reference to an empty array instead of undef when called in a scalar
context. This bug sounds awfully familiar, which is why I added the test
mentioned above...
Changes in version 2.1.5
------------------------
Fixed the migrate method so now it not only works, but also works
as originally planned (i.e. without requiring source messages to
be read entirely into memory). If the message is smaller than
the value in the Buffer parameter (default is 4096) then a normal
$imap2->append($folder,$imap1->message_string) is done. However, if
the message is over the buffer size then it is retrieved and written a
bufferful at a time until the whole message has been read and sent. (The
receiving server still expects the entire message at once, but it
will have to wait because the message is being read from the source in
smaller chunks and then written to the destination a chunk at a time.)
This needs extensive testing before I'd be willing to trust it (or at
least extensive logging so you know when something has gone terribly
wrong) and I consider this method to be in BETA in this release. (Numerous
people wrote complaining that migrate didn't work, and some even included
patches to make it work, but the real bug in the last release wasn't
that migrate was broken but that I had inadvertently included the pod for
the method which I knew perfectly well was not ready to be released. My
apologies to anyone who was affected by this.) The migrate method does
seem to work okay on iPlanet (i.e. Netscape) Messenger Server 4.x. Please
let me know if you have any issues on this or any other platform.
Added a new example, migrate_mbox.pl, which will demonstrate the migrate method.
Fixed a bug that will cause Mail::IMAPClient's message reading methods to misbehave if
the last line of the email message starts with a number followed by a space and either
"OK", "NO", or "BAD". This bug was originally introduced in 1.04 as a fix for another
bug, but since the fix supports noncompliant behavior I'm disabling this behavior by
default. If your IMAP clients start hanging every time you try to read literal text
(i.e. a message's test, or a folder name with spaces or funky characters) then you
may want to turn this on with the EnableServerResponseInLiteral parameter. Thanks go
to Manpreet Singh for reporting this bug.
Fixed a bug in imap_to_mbox.pl that has been there since 2.0.0 (when the Uid
parameter started defaulting to "True"). Thanks to Christoph Viethen for reporting
the bug and suggesting the fix. BUT NOTE THIS: I often don't test the example programs,
so you should think of them as examples and not free production programs. Eventually
I would like to add tests to my test suite (either the 'make test' test suite that you
run or my own more extensive test suite) but it's not a super high priority right now.
Significant improvements to the whole Mail::IMAPClient::BodyStructure module
were contributed by Pedro Melo Cunha. It's really much better now.
Bullet-proofing added to some private methods. (Private meaning they are undocumented
and not part of the module's API. This is perl not java.)
Fix applied to unset_flag to support user-defined flags (thanks to E.Priogov
for submitting the bug report and patch).
Changes in version 2.1.4
------------------------
Added Paul Warren's bugfix to the sort method.
Added Mike Halderman's bugfix for the get_bodystructure method.
Fixed a localization problem reported by Ivo Panecek. Because of this fix,
the Errno.pm file is now a prerequisite to this module. This way I can just
test to see if the error is an "EAGAIN" error (as defined in sys/errno.h and thus
Errno.pm) instead of awkwardly checking the string value of $!.
I also renamed the MaxTempErrors parameter to Maxtemperrors in response the same
bug report. Added a "MaxTempErrors" accessor method that will set and return
Maxtemperrors for backwards compatibility. Also, the number of temporary errors
gets reset after each successful I/O, so that the socket i/o operation fails only if
you if your temporary I/O errors happen more than "Maxtemperrors" times in a row.
The old behavior was to continue incrementing the count of temporary errors until
either the entire message was written or until a total of Maxtemperrors had occurred,
regardless of how many intervening successful syswrites occurred. This was a bug, but
Ivo politely suggested the new behavior as an enhancement. ;-) Also, you can now
specify "UNLIMITED" as the Maxtemperrors, in which case these errors will be ignored.
And the default for Maxtemperrors is now 100, but I'm open to any feedback you may
have in this regard.
I also fixed the operator precedence problem that was reported by many folks in that
very same part of the code. (As you may have guessed, that code was new in the last
version!)
One of the people who reported the precedence problem was Jules Agee, who also submitted
a patch that may in the end provide an optimal solution to handling EAGAIN errors.
Unfortunately I have not had time to retrofit his patch into the current version of the
module. But if I can manage to do this soon and it tests well I'll include it in the next
release, in which case the Maxtemperrors parameter will be of interest only to historians.
I also received a patch from John Ello that adds support for Netscape's proprietary
PROXYAUTH IMAP client command. I haven't included that support in this release because
you can already use the proxyauth method. It's one of those famous "default" methods
that, despite their fame and my documentation, nobody seems to know about. But you
can always say "$imap->proxyauth($uid)", for example, providing that $imap and $uid
are already what they're supposed to be. (I've been doing this myself for years.)
However, John's patch does provide a cleaner interface (it remembers who you are as
well as who you were, for example) so I may include it later as part of a separate
module that extends Mail::IMAPClient. This would also give me an excuse for providing
the framework for plugging in Administrative methods that are proprietary to other imap
servers, so if you have a technique for acquiring administrative access to your users'
mailboxes (besides proxyauth) please let me know what it is. Perhaps we'll get something cool out of it, like a document on how to write administrative scripts for various
platforms and a suite of supporting methods for each.
Changes in version 2.1.3
------------------------
Added the new method append_string. It works similarly to append but will allow extra
arguments to supply the flags and internal date of the appended message. See the pod
for more details.
( run in 0.505 second using v1.01-cache-2.11-cpan-39bf76dae61 )