我编写了一个将所选电子邮件移至垃圾箱的AppleScript。这个脚本在这方面效果很好。问题是电子邮件仍保留在服务器上。是否有额外的代码,我需要添加它来做到这一点?以下是代码:Applescript将电子邮件移动到垃圾箱但未从服务器中删除
using terms from application "Mail"
on perform mail action with messages these_messages for rule this_rule
tell application "Mail"
set the message_count to the count of these_messages
repeat with i from message_count to 1 by -1
set this_message to item i of these_messages
set this_content to (every character of content of this_message) as Unicode text
if "bowles" is not in this_content and "patton" is not in this_content then
set theAccount to account of mailbox of this_message
set mailbox of this_message to mailbox "Trash" of theAccount
end if
end repeat
end tell
end perform mail action with messages
end using terms from
你使用pop,imap,exchange吗? – adayzdone 2012-03-07 02:55:40
这是一个POP服务器:goDaddy。我有一条规则删除其他电子邮件。它在服务器上留下项目没有问题。 – curt 2012-03-07 07:22:31
我试着评论了代码的各个部分。这是导致问题的第二行代码。我甚至将它移到另一个由另一个规则执行的脚本中。电子邮件仍保留在服务器上。 – curt 2012-03-12 16:29:09