Use the "Insert File" script step to have the user insert their attachment into a temporary global container field.
You can then use that field in the attachment field specified with the Send Mail script step.
Are you sure that would work? The specify file dialog used for attachments can't evaluate calculations unless FMP 15 provides something new in this regard.
but you can insert that file into a container "by reference" and then set a variable to the file path thus stored in the container field. That variable can then be used as the attachment reference in the specify file dialog.
yeah, I guess I gave a partial answer. You would have to export the attachment using Get(TemporaryPath) from there and then attach it.
Insert File [ Table::tempglobal ; with dialog ; not as reference ]
Set Variable [ $path ; "file:" & Get(TemporaryPath) & GetAsText(Table::tempglobal) ]
Export Field Contents [ Table::tempglobal ; $path ]
Send Mail [ ... ; attachment = $path ]
If you use the "by reference" option when inserting the file, there's no need to export it as you can get the path directly from the container field.
Set Variable [$Path ; value: GetValue ( ValueCount ( YourTable::ContainerFIeldHere ) ) ]
I've used this method for years as a way to ask the user to find and select a File for importing. It should work just as well for attaching files.