rjbs / Email-MIME

perl library for parsing MIME messages
20 stars 30 forks source link

Email::MIME->as_string prints `ARRAY(...)` for arrayref To/Cc #79

Closed richardjharris closed 1 year ago

richardjharris commented 1 year ago

Example code:

use Email::MIME;

my $email = Email::MIME->create(
    header_str => [ To => ['foo@example.com', 'bar@example.com'] ]
);
print $email->as_string;

Output:

To: ARRAY(0xc6ba68)
Date: Thu, 12 Jan 2023 10:44:38 +0000
MIME-Version: 1.0

~The e-mails appear to be sent correctly, so this is only an issue for the as_string method.~

richardjharris commented 1 year ago

More generally, arrayref for To/Cc does not seem to work at all (despite the perldoc showing it). It gets immediately stringified to ARRAY(...) in the constructor. Same applies for header_str_set.

Using a CSV works fine and is wrapped correctly, so perhaps the perldoc just needs updating.

richardjharris commented 1 year ago

Closing as false positive - had an old version of the module installed on one machine