Solved

Decode Email Message 2

Posted on 2001-07-08
2
150 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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now