Subject: | Mail::Box::IMAP4: create => 1 fails on because of an undefined value |
I'm trying to use Mail::Box to move some mail to an IMAP server.
Unfortunately, this fails:
./create_bug.pl
ERROR: Couldn't select IMAP4 folder newfolder
Use of uninitialized value in string eq at
/usr/share/perl5/Mail/Transport/IMAP4.pm line 205.
ERROR: Couldn't select IMAP4 folder newfolder
Can't call method "createFolder" on an undefined value at
/usr/share/perl5/Mail/Box/IMAP4.pm line 90.
Is there any known working way within Mail::Box to create non-existent
folders on the IMAP server?
Subject: | create_bug.pl |
#!/usr/bin/perl
use strict;
use Mail::Box::IMAP4;
my $folder = "newfolder";
my %args = ( server_name => "127.0.0.1",
username => "xxxxxx",
password => "xxxxxx",
access => "rw");
my $imap = Mail::Box::IMAP4->new(%args, folder => $folder, create => 1);
if(!$imap) {
die "failed to establish connection";
}