Moving a message in OS X's Mail.app
Moving a message in OS X's Mail.app
- Subject: Moving a message in OS X's Mail.app
- From: "Stephan R. Cleaves" <email@hidden>
- Date: Fri, 14 Mar 2003 16:14:12 -0500
Hi,
I'm trying to move a message in Mail.app under OS X in a script that I
have running from a rule within the perform_mail_action handler. The
reason for this is that setting up a rule that runs a script and moves
a message always seems to change the order to do the move first and
then the script doesn't run. So my thinking was that in the script I
would move the message after I have taken the action I desire. Here is
the code to move a message that would be run manually (note this is not
exactly the same thing I'm trying to accomplish)...
tell application "Mail"
set mbox to mailbox named "Deleted Messages" of account ".Mac"
count messages of mbox
set theViewer to first message viewer
set selectedMessages to selected messages of theViewer
move selectedMessages to mbox
count messages of mbox
end tell
The above script tries to move any currently selected messages from
the mailbox they are in to the Deleted Messages mailbox of account
.Mac. This likely will only work for messages that are actually on .Mac
to begin with. This script runs to completion just fine. The trouble is
it doesn't do anything. The selected messages are still in the mailbox
they started in and the Delete Messages mailbox does not get any new
messages. I'm actually beginning to wonder if maybe the "move" command
doesn't work in Mail.app?
Any help would be greatly appreciated.
Thanks in advance,
Stephan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.