2020-10-24 23:57:45 +05:30
---
stage: Plan
group: Certify
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-24 23:57:45 +05:30
---
2021-09-30 23:02:18 +05:30
# Reply by email **(FREE SELF)**
2020-10-24 23:57:45 +05:30
2016-11-03 12:29:30 +05:30
GitLab can be set up to allow users to comment on issues and merge requests by
replying to notification emails.
## Requirement
2018-12-05 23:21:45 +05:30
Make sure [incoming email ](incoming_email.md ) is set up.
2016-11-03 12:29:30 +05:30
2021-02-22 17:27:13 +05:30
## How it works
2016-11-03 12:29:30 +05:30
2021-02-22 17:27:13 +05:30
Replying by email happens in three steps:
1. GitLab sends a notification email.
1. You reply to the notification email.
1. GitLab receives your reply to the notification email.
### GitLab sends a notification email
2016-11-03 12:29:30 +05:30
When GitLab sends a notification and Reply by email is enabled, the `Reply-To`
header is set to the address defined in your GitLab configuration, with the
`%{key}` placeholder (if present) replaced by a specific "reply key". In
addition, this "reply key" is also added to the `References` header.
2021-02-22 17:27:13 +05:30
### You reply to the notification email
2016-11-03 12:29:30 +05:30
2021-02-22 17:27:13 +05:30
When you reply to the notification email, your email client:
2016-11-03 12:29:30 +05:30
2021-09-30 23:02:18 +05:30
- Sends the email to the `Reply-To` address it got from the notification email
- Sets the `In-Reply-To` header to the value of the `Message-ID` header from the
2016-11-03 12:29:30 +05:30
notification email
2021-09-30 23:02:18 +05:30
- Sets the `References` header to the value of the `Message-ID` plus the value of
2016-11-03 12:29:30 +05:30
the notification email's `References` header.
2021-02-22 17:27:13 +05:30
### GitLab receives your reply to the notification email
2016-11-03 12:29:30 +05:30
2021-02-22 17:27:13 +05:30
When GitLab receives your reply, it looks for the "reply key" in the
2016-11-03 12:29:30 +05:30
following headers, in this order:
2021-09-30 23:02:18 +05:30
1. `To` header
1. `References` header
2021-11-18 22:05:49 +05:30
1. `Delivered-To` header
1. `Envelope-To` header
2016-11-03 12:29:30 +05:30
2021-02-22 17:27:13 +05:30
If it finds a reply key, it leaves your reply as a comment on
2016-11-03 12:29:30 +05:30
the entity the notification was about (issue, merge request, commit...).
For more details about the `Message-ID` , `In-Reply-To` , and `References headers` ,
2021-01-29 00:20:46 +05:30
see [RFC 5322 ](https://tools.ietf.org/html/rfc5322#section-3.6.4 ).