It is possible to use a file instead of Writing direct code for the Condition and Configuration part in the Scriptrunner custom email post function. However I do not manage to find the documentation that explains what the file name needs to be (name + extension) and where it should be placed so that i can be found.
I have tried place a file called SendEmailCopyToRecipient.groovy in the Scripts folder located at ..Atlassian\Application Data\JIRA which is the Location of Jira Local Home, but with no luck.