Mail app + AppleScript
Hi everyone!
I have a script which takes attachment from mails of iCloud account mailbox and save them to destination folder. All works perfect!
Today I imported my Microsoft Windows Outlook 2010 mail file .PST in Mail.app. It's saved to "On my Mac". But, when I call from script this path I have error message.
in first case I have this code and in work fine:
tellapplication"Mail"
settheMessages to messages of mailbox "INBOX" of account "iCloud"
repeat with aMail in theMessages
-- other part of code
----------------
end tell
When I try to access to "On my Mac" path it crashes:
ell application "Mail"
set theMessages to messages of mailbox "Imported" of ( on my mac)
Is anyone can help to make correct request to "Imported" mailbox?