Take a look at the Date::Parse module as well, as it can handle a lot of 
different Date/Time formats. You may need to "find" the Date/Time string first 
(that should be a few simple regexps) and then hand it off to Date::Parse.

Personally I would take that approach on a number of sample messages and make 
sure I have an exception log that tells me about dates/times that I was not 
able to filter correctly. Obviously, you don't want to process messages 
(delete) where you are not 100% sure that you determined the correct date/time. 
Then work through the exception log and add support for those dates as well.

Cheers - Tobias

From: [email protected] 
[mailto:[email protected]] On Behalf Of Paul 
Rogers
Sent: Wednesday, March 24, 2010 9:17 AM
To: [email protected]
Subject: RE: parsing email headers


I have indeed been using Mail::POP3Client.  However, it's the dates that I 
think could prove tricky.  The code down below does indeed narrow down to the 
date (assuming I work with the "Date:" header).  Dates appear to be in "DD MMM 
YYYY" format (e.g. 24 Mar 2010). But will that apply regardless of the sender's 
local language settings?  RFC822 seems to point to an English-based month in 
the date syntax, but is that always be the case?


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to