10.9 Mavericks Mail message move problem

I had a script which would find all messages based on a email address and moved them to the correct sub folder on my iCloud. However since 10.9 the script no longer works.

tell application "Mail"
   tell inbox
       set mess to messages whose sender contains "roel"
       
   end tell
   
   tell account " ACCOUNT NAME "
       move mess to mailbox "Friends_family"
   end tell
end tell

It gets all the messages, however it gives a error when i try to move it. Has anybody got any ideas?

Thanks :slight_smile:

As far as I know, you must use a loop to move the messages one by one.

Yvan KOENIG (VALLAURIS, France) samedi 21 juin 2014 10:39:44

Hey James,

You cannot create a list of messages and then move the-list as a unit, however you can do something like this if you get your references right:

tell application "Mail"
	move (messages of inbox whose sender contains "roel") to mailbox "Friends_family"
end tell