in reply to Mail::Message->get('received') failing
Could this be relevant, from the documentation:
$obj->get(FIELDNAME)
Returns the value which is stored in the header field with the specified name. The FIELDNAME is case insensitive. The unfolded body of the field is returned, stripped from any attributes. See Mail::Message::Field::body().
If the field has multiple appearances in the header, only the last instance is returned. If you need more complex handing of fields, then call Mail::Message::Head::get() yourself. See study() when you want to be smart, doing the better (but slower) job.
I note that the field name is case insensitive, so it's not that. While this says that $msg->get('Received') will only receive the last if there are many, it doesn't quite explain why you get none at all. But I note the reference to Mail::Message::Head::get(). I also found:
given as an example, and apparently should return all the received lines.my @rec = $msg->head->study('Received');
|
|---|