Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Message-ID header is being overridden by the API generated unique ID #432

Open
venkatsc opened this issue Mar 18, 2020 · 0 comments

Comments

@venkatsc
Copy link

Describe the bug
Custom Message-ID header is being overridden by the API
To Reproduce
Steps to reproduce the behavior:
Set message-id header <[email protected]> and send out the mail

Expected behavior
The message header should be message-id: <[email protected]>

Additional context
Seems, message-id being set to generated unique-id irrespective of headers set by API user.
https://github.com/eclipse-ee4j/mail/blob/4c092797479f6fb05576e723a6855a7e116ed027/mail/src/main/java/javax/mail/internet/MimeMessage.java#L2210
generated message id should be used only when
if (getHeader("Message-ID") == null)

Could not verify the above fix due to #431

venkatsc added a commit to venkatsc/mail that referenced this issue Mar 18, 2020
Currently, the API generates message-id and
uses it overriding the user provided message id.
jakartaee#432

This fix should be used with setHeader method.
addHeader method has the following issue
jakartaee#433
leading to the override despite this fix.

Signed-off-by: Venkat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant