Skip Menu |

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

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

People
Owner: PLOBBES [...] cpan.org
Requestors: eco [...] ecocode.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 3.25
  • 3.26
Fixed in: 3.27



Subject: migrate fails
Hello ! I'm using Mail::IMAPClient on MobileMe server mail.me.com. Reading, Parsing, flags, move do function correctly while using only one email user. However migrate fails from one user to another. I checked that both imapserver objects can read, parse and move mail locally. But still migrate fails with 'write' failed error. -- Erik
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.
On Sun Feb 13 12:18:17 2011, PLOBBES wrote: Show quoted text
> 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:
yep patch does the job ! thanks for the very fast answer ;) -- Erik
Mail::IMAPClient 3.27 has been released and is available on CPAN!