지금까지 해보신 것은 무엇입니까? 귀하의 질문은 매우 광범위합니다. 다음을 시작해야합니다.
property secondsIn120Days : 10368000
tell application "Mail"
set theInbox to inbox
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn120Days then
(* In answer to your comment, any folder you create to archive
messages is going to be in the "On My Mac" directory. But say you
create a Smart Mailbox called "Mail Archive" then all you should
need are these lines... *)
set archiveMailbox to (mailbox ("Mail Archive" as string))
move currentMessage to archiveMailbox
end if
end repeat
end tell
업데이트 : 코드에 주석에 대한 응답을 추가했습니다.
나는 이것을 보았다 : http://www.doughellmann.com/projects/MailArchiveByDate/. 기본적으로 나는 그것을하고 싶지만 달로 분류하지 않고 싶다. 나는 그것이 단지 하나의 최상위 폴더에 있기를 원합니다. – churnd
메시지 보관을 위해 만든 폴더는 "내 Mac"디렉토리에 있습니다. 하지만 "Mail Archive"라는 스마트 메일 박스를 만들고 다음 줄만 있으면됩니다. "archiveMailbox를 (mailbox ("Mail Archive "문자열로) 설정하십시오.) currentMessage를 archiveMailbox로 이동하십시오."위의 업데이트 된 코드를 참조하십시오. 적절한 서식 지정. –