Erik,
For starters, it appears that the code is appending to $self instead of
$peer! I'll release a patch for this soon, sorry about that! Here's a
diff in case you want to test:
[ppearl@vmwork mail-imapclient]$ git diff
diff --git a/lib/Mail/IMAPClient.pm b/lib/Mail/IMAPClient.pm
index b1fe956..3618c41 100644
--- a/lib/Mail/IMAPClient.pm
+++ b/lib/Mail/IMAPClient.pm
@@ -7,7 +7,7 @@ use strict;
use warnings;
package Mail::IMAPClient;
-our $VERSION = '3.26';
+our $VERSION = '3.27_01';
use Mail::IMAPClient::MessageSet;
@@ -876,7 +876,7 @@ sub migrate {
$self->message_to_file( \$msg, $mid )
or return undef;
- my $newid = $self->append_file( $dfolder, \$msg, undef, $flags,
$date );
+ my $newid = $peer->append_file( $dfolder, \$msg, undef, $flags,
$date );
unless ( defined $newid ) {
$self->LastError(
Also, you probably want to set Reconnectretry => 1 on both $self and
$peer (in case one connection is timed out while an operation happens on
the other connection). Lastly, if this patch doesn't help I'll need more
details as to the error that is occurring. You can set Debug => 1 and
log the IMAP session and provide some details around the time the error
occurs.