I am attempting to send an email via the standard Apple Mail application using a POSIX file reference on macOS Sierra (10.12.3). Everything builds fine, but when it sends, the attachment is not being received.
Here's the code:
set fileReference to (choose file with prompt "Select file for attachment...")
tell application "Mail"
make new attachment with properties {file name:fileReference}
The recipient is set earlier in the code, and there are no issues with sending the email itself: just the attachment.
Any help or insight would be greatly appreciated.