Subject: | get list of all mail folders known by outlook |
the attached patch adds a method all_folders() to Mail::Outlook to get
the list of all MAPI folders.
would you consider including it to mail::outlook?
Subject: | mail-outlook-all_folders.patch |
--- Outlook-old.pm 2007-06-11 16:02:39.926263700 +0200
+++ Outlook.pm 2007-06-11 16:08:42.323511000 +0200
@@ -162,6 +162,22 @@
Win32::OLE->FreeUnusedLibraries();
}
+=head2 all_folders()
+
+Get the list of all open mail folders in Outlook
+
+=cut
+
+sub all_folders {
+ my ($self) = @_;
+ my $folders = $self->{namespace}->Folders;
+ my @folders;
+ push @folders, $folders->Item($_)->Name
+ for 1 .. $folders->Count;
+ return @folders;
+}
+
+
=head2 folder()
Gets or sets the current folder object.