Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Get "Received: " fields from messages headers in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get "Received: " fields from messages headers in Mail.app



Hi,

I'm trying to get the content of every "Received: " fields from the header of a message in Mail.app using an Applescript.

It works well when there is only one "Received: " field in the header. I get the content of the field doing:

set theHeader to the header of theMessage
repeat with theItem in theHeader
set Name to name of theItem
set theHeaderContent to content of theItem
if Name is equal to "received" then
display dialog theHeaderContent
end if
end repeat

But when there are more then one "Received: " field, let's say 3 of them, I will get 3 dialog boxes with every time the same content, while each "Received: " field has different content of course.

Do you think there is a bug in the Mail Applescript or is there something wrong in my code?

Thanks for your help.

JG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.