Re : Moving a message to another mailbox in Mail.app
Re : Moving a message to another mailbox in Mail.app
- Subject: Re : Moving a message to another mailbox in Mail.app
- From: Reinforced Darkness <email@hidden>
- Date: Sun, 5 Oct 2003 12:44:48 +0200
That all the problem of Apple mail scripting : standards commands move,
delete, open,... won't apply for messages (why?). it's disappointing
that Apple workers did not write an easy scipting for that app like you
have for Outlook, Entourage (written by microsoft teams!)
If you want to move messages, you'll have to change the property
mailbox of the message. Try this (moves a selected msg to the imap
account trash:
//
tell application "Mail"
set poubelle to {}
repeat with _account in every imap account
set end of poubelle to item 1 of ,
(mailboxes whose name begins with "Messages supprimis" and name
contains name of _account)
----- "Messages supprimis" is the french name for trashed msg -----
end repeat
set la_selection to my selection_msg_Mail()
set mailbox of la_selection to item 1 of poubelle
end tell
on selection_msg_Mail()
tell application "Mail"
activate
set la_selection to selected messages of item 1 of every message
viewer
try
return item 1 of la_selection
on error
display dialog "aucun message n'est silectionni!" with icon note
giving up after 3
return {}
end try
end tell
end selection_msg_Mail
//
I think that if you have several accounts, you'll have to move these
msg according to their accounts because these special mailboxes are
objects of accounts. I have not tried that point.
Message: 11
Date: Sat, 4 Oct 2003 14:39:19 -0500
Subject: Moving a message to another mailbox in Mail.app
From: Lorin Rivers <email@hidden>
To: email@hidden
I have a script that I wrote that deletes duplicate emails by setting
the "is deleted" flag. I'd prefer to move those messages to the deleted
messages mailbox but couldn't figure it out.
The "is deleted" flag just magically disappears the message -- but it's
not as safe as I'd like.
--
Lorin Rivers
Marketing Professional
<mailto:email@hidden>
<http://homepage.mac.com/lrivers>
512.478.8114
_______________________________________________
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.