jakartaee / jakartaee/mail-api
addHeader creating a duplicate header entry
- Dominant language
- Java
- Stars
- 285
- Forks
- 109
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Add header creating a duplicate header. This leads to silent drop of one of the header (the latter in the header list).
**To Reproduce**
Steps to reproduce the behavior:
1. Create MimeMessage
2. Add header "Message-Id"
**Expected behavior**
Added Message-Id should be preserved but due to duplicates in the header list the added Message-Id is ignored.
**Screenshots**

**Additional context**
Workaround: use setHeader in conjunction with https://github.com/eclipse-ee4j/mail/issues/432 fix.
Contributor guide
Research direction
Start with the MimeMessage addHeader reproduction described in this issue and compare its behavior with setHeader and the fix referenced in issue 432. Verify that adding Message-Id does not leave duplicate entries and that the added value is preserved rather than silently dropped; the payload does not name a file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100