Decode Email Message 2

How do i access the header values in a hash (from a MIME::Entity object)????

I know you can set them but how do you read them from a decoded message?

Thanks

Steve
shodgkissAsked:
Who is Participating?
 
andreifCommented:
If you have your message in an entity you can get header object doing this

$head = $entity->head;
$head->decode;

print $head->as_string; # prints full header
print $head->get('From'); # prints "From" value
0
 
andreifCommented:
If you have your message in an entity you can get header object doing this

$head = $entity->head;
$head->decode;

print $head->as_string; # prints full header
print $head->get('From'); # prints "From" value
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.