Subject: | ENVELOPE as part of fetch_hash doesn't process |
I am using Version 3.25 (comes with Ubuntu package)
Perl version 5.10.1
Ubuntu
I would like to be able to do the following code:
(already have logged into imap server represented by $imap)
$imap->select("INBOX");
my $hashref = {};
$imap->fetch_hash("ENVELOPE", $hashref);
Unfortunately, when "ENVELOPE" is part of fetch_hash you get the following:
Use of uninitialized value $_ in pattern match (m//) at
/usr/share/perl5/Mail/IMAPClient.pm line 2238.
It IS getting the envelope, as $hashref->{UID}->{ENVELOPE} contains the
actual envelope string for example "date" "subject" ((FROM)) .... It's
just throwing this error.
Additionally - it would be nice to be able to get an M:I:B:Envelope
object from the envelope string. Calling M:I:B:E will not work unless
you wrap the envelope string in something like:
'* 0 FETCH (UID 0 ENVELOPE (' . $e2 . '))' # where $e2 is the envelope
string in this example.
I understand why it doesn't work, and my hack works for me, but I could
understand where someone else would want to do a ->fetch_hash that
includes ENVELOPE as one of the variables and be able to use that
Envelope data without having to individually fetch the messages, or the
BODY or anything else. Including RFC822.SIZE or INTERNALDATE in the
fetch_hash gets usable info since those are just strings, but there
should be a convenience method for dealing with ENVELOPE if that string
is returned.
Thanks! Great module.