• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mail rule script flag as junk and move messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail rule script flag as junk and move messages


  • Subject: Mail rule script flag as junk and move messages
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sun, 7 Nov 2004 22:17:22 -0500

I've been trying to develop a mail rule script that will flag messages as junk and then move them to the junk mailbox. Using the built-in "move message to" doesn't flag them. It sounds simple enough but I can't get it to work. Copies of messages are left in the Inbox, flagged as junk, and end up being sent to the junk mailbox multiple times. Here is what I've got so far:

on perform_mail_action(info)
tell application "Mail"
set selectedMessages to |SelectedMessages| of info
set mCnt to count selectedMessages
repeat with mIndx from mCnt to 1 by -1
set eachMessage to contents of item mIndx of selectedMessages
set junk mail status of eachMessage to true
set mailbox of eachMessage to junk mailbox
move eachMessage to junk mailbox
end repeat
end tell
end perform_mail_action


Can anyone tell me where I'm going wrong?  Thanks in advance.

Marc [11/7/04  10:16:03 PM]

_______________________________________________
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


  • Prev by Date: Re: Bridge anyone? [not off topic]
  • Next by Date: Re: Bridge anyone? [not off topic]
  • Previous by thread: Re: Alias Forms as Property
  • Next by thread: How to extract the email address in a the message body
  • Index(es):
    • Date
    • Thread