Using POSIX path to attach a file to email in AppleScript
Open Script Editor, create a new document, and add the AppleScript Code, shown below, to it.
In the make new to recipient ... line of code, change the values of {name:"John Doe", address:"johndoe@domain.com"} to your name and email address for testing purposes.
Now run the script.


Note that after selecting the attachment, the script will compose the email, attach the file, and send it.
Then check your Inbox for the message, to see that the file was attached.
It worked for me!



AppleScript Code:

set theAttachment to (choose file with prompt "Select file for attachment...")
tell application "Mail"
    set theMessage to make new outgoing message with properties {visible:true, subject:"File Attachment Test", content:"Was a file attached when you received this email?" &amp; linefeed &amp; linefeed}
    tell theMessage
        make new to recipient at end of to recipients with properties {name:"John Doe", address:"johndoe@domain.com"}
    end tell
    tell content of theMessage
        make new attachment with properties {file name:theAttachment} at after last paragraph
    end tell
    send theMessage
end tell