Reads mail-key from CC in general email receiver
What does this MR do and why?
Solves Allow CC'ing incoming_email and service_desk_email (#348572 - closed)
Contributes to Use minimal inline email bodies in specs instea... (#426973)
Allows Service Desk and notification email reply addresses to be present in the CC
header.
For example, you want to send an email to someone and also raise a new issue in Service Desk.
Screenshots or screen recordings
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Set up
incoming_email
. Feel free to fully set it up. For this MR you can also stub it by adding this to yourgitlab.yml
underdevelopment:
incoming_email: enabled: true address: "incoming+%{key}@example.com"
- In the
rails
console, pick a project and get the service desk incoming address:project = Project.find(7) service_desk_address = project.service_desk_incoming_address
- Prepare an email body and simulate ingesting the email using the
EmailReceiverWorker
:email_raw = <<~EMAIL To: dontcare@example.com From: marc@example.com Cc: #{service_desk_address} Subject: Test SD issue Email content EMAIL EmailReceiverWorker.new.perform(email_raw)
- This should create a new issue (see the
INSERT
statement). You can also browse to you projects issue list or Service Desk issue list and find and issue with the title "Test SD issue".
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Marc Saleiko