compare these results of these two scripts:
[php]
tell application "Mail"
set aMessage to the first message of the first mailbox
set recHeadersList to every header of aMessage whose name is "Received"
recHeadersList
end tell
[/php]
[php]
tell application "Mail"
set aMessage to the first message of the first mailbox
set numHeaders to count of headers of aMessage
set recHeadersList to {}
set i to 1
repeat while i is less than or equal to numHeaders
tell header i of aMessage
if name is "received" then
set recHeadersList to (recHeadersList & content) as list
end if
end tell
set i to i + 1
end repeat
end tell
recHeadersList
[/php]
Shouldn't they both return what the second script returns?