尝试如下操作:
tell application "Mail"
set theSelection to selection
set theMessage to item 1 of theSelection
set theMailbox to theMessage's mailbox
set theMessageID to theMessage's id
set theMessageIDs to (id of every message of theMailbox)
set theMessages to (every message of theMailbox)
repeat with i from 1 to (count theMessageIDs)
if item i of theMessageIDs is theMessageID then
set message viewer 1's selected messages to {item i of theMessages}
exit repeat
end if
end repeat
end tell
请注意,这假设有一些事情只有一个邮箱被选中,您没有移动最后一条消息,以此类推。