Solved

Decode Email Message 2

Posted on 2001-07-08
2
154 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:shodgkiss
  • 2
2 Comments
 
LVL 6

Expert Comment

by:andreif
ID: 6264256
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
 
LVL 6

Accepted Solution

by:
andreif earned 100 total points
ID: 6277108
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question