# How to route emails to projects

Sometimes it is required for a single Mail Handler to create issues not only in a single project but in several ones based on some email attributes. Email This Issue Mail Handler along with its support to initialize issue fields provide an easy solution for this.

To implement email routing, first set up a mail handler by following the "Configure Mail Handler to Process Emails" section in the corresponding tutorial: Setting up an Email Help Desk.

Configure the mail handler by enabling the option: "Initialize Issue Fields":

![](/files/cIEyUyeupuWk2M2qM6Cr)

Then add a new Field Context that covers your project or projects of the mail handler:

![](/files/ogF1qDqYxccX9xOLO8EK)

Configure the Field Context by adding field rules for each possible sender domains with the following attributes:

![](/files/RN1TgLqPMoBOSFzZlcKR)

Field Rules of these type will implement email routing based on the sender's email address. &#x20;

![](/files/grMYXYdFgFZgjb1INTOA)

However, following the same logic, you can route emails to different projects also based on recipient addresses, email subject and body content etc.

Project routing works if the issue type (and the corresponding workflow) is the same in all projects to which the routing is configured.

### What to do next <a href="#routeemailstoprojects-protip" id="routeemailstoprojects-protip"></a>

If you successfully routed your emails to different projects, you may want to comment the issues from any subsequent emails via the same Mail Handler.

In order to make this work for you, you will have to do either of the following:

* Configure your mail handler with the Project field left empty, this will mean that the Mail Handler is applied to all projects
* Configure mail handlers for each Project you are routing to.

{% hint style="info" %}
&#x20;**Note:** This does not require you to set up different email accounts and mail handlers in Jira, only in Jira Email This Issue.
{% endhint %}

Similarly, if you want to initialize issue fields or execute workflow transitions for subsequent emails that are related to issues, make sure your Field Context includes the projects or add Field Contexts for each projects you are routing to.

<br>

<br>

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meta-inf.hu/email-this-issue/email-this-issue-for-jira-server-data-center/faq/faq/how-to-route-emails-to-projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
