I hope to crete a script which allows me to export selected messages to separate text UTF8 files
It should be a a loop telling the script to
1-Create/Select a destination folder
2-open the first selected message in the Apple Mail found messages browser window
3-Rename the mesge with subject and timestamp
4-Save it in the folder of choice as RAW Source (⌥⌘U) in the Apple mail View-> Message-> Raw source combination
5-Repeat with next till last message as resulting from the Selection window?
This is what I did, however nothing get saved while in the Events everythig appear properly
set theOutputFolder to POSIX path of (choose folder)
tell application "Mail"
set theSelection to selection
set theMessage to item 1 of theSelection
repeat with a from 1 to length of theSelection
set MessagS to source of theMessage
set MessagID to id of theMessage
set Mess to MessagID & MessagS
try
set theSavePath to theOutputFolder
save Mess in theSavePath
end try
end repeat
end tell
Thanks for the help