Question: I have groovy email template(for Selenium Robot framework test execution) for Jenkins. Jenkins master is controlled by a remote team. So for placing this template in $JENKINS\_HOME/email-templates, we need to raise a ticket and wait from 2 to 3 days. Also we expect, there might be changes required in template. So we are planning to put our templates inside our source code repository (GIT). so in the Jenkins test job, we checkout the test script together with email templates. 
How to instruct Jenkins to look for the template in workspace folder instead of $JENKINS\_HOME/email-templates in Jenkins Master

Answer: 
Sadly it seems you would need to modify the email-ext plugin as the search path is hardcoded into it.

You can see it [here](https://github.com/jenkinsci/email-ext-plugin/search?utf8=%E2%9C%93&q=email-templates), check the occurrence on line 69 in file `src/main/java/hudson/plugins/emailext/EmailExtTemplateAction.java`

Changing it to another path would be trivial, however adding multiple locations you'd probably have to put some work in.

**Edit:** I wonder if it would be possible to put the wanted stuff into some txt file as a build step, and then load it into the mail content via some template configuration. If you have access to the job configuration this might be worth checking.
You can copy the template into the build workspace (e.g. with SCM step), and then email-ext can reach it:

```
${SCRIPT, template="${WORKSPACE}/foo.template"}

```