Mail.app and Selection
Mail.app and Selection
- Subject: Mail.app and Selection
- From: Hurston Prescott <email@hidden>
- Date: Fri, 21 Sep 2001 16:38:29 -0500
In Outlook Express I had an attached AppleScript that would allow me to
select messages and export them to an FMP database (script below). Now,
with 10.1 (Puma64) and Mail.app I get hung on the first step, getting
the selected messages. It doesn't seem to understand the term
"selection" and I can't find anything comparable in the dictionary. Does
anyone know if this is possible? Also, am I correct in assuming that the
closest I can come to attaching a script to Mail.app is putting it in my
Script Runner?
Thanks,
Hurston
tell application "Outlook Express"
set myMessages to selection
repeat with myMessage in myMessages
my processMail(myMessage)
end repeat
end tell
on processMail(myMessage)
tell application "Outlook Express"
set mySender to sender of myMessage
set mySubject to subject of myMessage
set myContent to content of myMessage
end tell
tell application "FileMaker Pro"
tell database "OE.fp5"
go to layout "Email Import"
create new record with data {mySender, mySubject, myContent}
end tell
end tell
end processMail