The function plugins.mail.createBinaryAttachment provides two arguments: what to name the file being attached and the path to the file to be processed.
Is there a simple way to identify (parse out) the name of the file the user selected? Yes, I can (and have) built a complex routine using the Utilities functions, but I sense there is probably something simpler available.