Solved

Decode Email Message 2

Posted on 2001-07-08
2
152 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell Find Folders 7 53
Using winfows 7 and 10 download en install MYSQL server from a batch 13 123
exchange ,script 10 43
Transform normalized CSV to line in powershell 7 36
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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