I use a simple AppleScript to get one or more email from Mail.app in FileMaker.
It runs pretty well, except for rich text which is unfortunately "lost" in the process but I can live with it.
I try to add the email attachment to my record but I fail to do it.
I try this AppleScript :
tell application "Mail"
set Sel to selection
set Var to 1
set Msg to item Var of Sel
set Corps to content of Msg
set listPJ to mail attachment of Msg
set PJ to file Var of listPJ
on error errorMsg
display dialog errorMsg
And I get the error attached.
I tried in Script editor and in FileMaker and get of course the same issue.