set selectedMessages to every message of mailbox "aaa"
In the asker's code, the selected messages were passed by a Mail rule.
I'm reluctant to reproduce it here as it's not mine.
Since my late message, I made other tests.
The unique setting which work is :
set attachmentsFolder to path to downloads folder as text
With the setting which I used for years :
set attachmentsFolder to (path to documents folder as text) & "Attachments:"
it continue to fail.
It's really puzzling because all the tested folders have the same permissions:
me : read-write
everyone : unauthorized access (translated from the french Accès interdit)
I have no idea of what may explain that.
Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) mercredi 4 janvier 2017 12:44:58
Le 4 janv. 2017 à 12:27, Brian Christmas <
email@hidden> a écrit :
Yvan, wouldn’t you also need something like ‘select message 1 of mailbox "messageStore"’? How else would you programatically select as a ‘
selection’?
I’m surprised it worked though!
Regards
Santa