Skip Menu |

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

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

People
Owner: PLOBBES [...] cpan.org
Requestors: icestar [...] inbox.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.00
Fixed in: 3.21



Subject: NIL personal name returned by *_addresses methods
There is a bug in *_addresses family methods of Mail::IMAPClient::BodyStructure::Envelope Subclass. They return NIL in spite of documentation which says "The addresses are in the format personalname <mailboxname@hostname>. However, if the personal name is 'NIL' then it is omitted from the address." So, I opened the code and found this: sub _addresses($$$) { my ($self, $name, $isSender) = @_; ref $self->{$name} eq 'ARRAY' or return (); my @list; foreach ( @{$self->{$name}} ) { my $pn = $_->personalname; my $name = $pn && $pn ne 'NIL' ? "$pn " : ''; push @list, $pn. '<'.$_->mailboxname .'@'. $_->hostname.'>'; } wantarray ? @list : $isSender ? $list[0] : \@list; } You use $pn variable when composing the result instead of $name.
Thank you for the bug report! I have patched this and this bug will be fixed/closed with the next release.
Just released Mail::IMAPClient 3.21 which should resolve this bug. If you happen to test and run into any problems please let me know. Thanks!