-
Notifications
You must be signed in to change notification settings - Fork 103
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
Use user provided message-id #435
Conversation
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]>
Build fails with: any idea? |
Signed-off-by: Venkat <[email protected]>
With this change, this method will no longer update message id, as only non-exisitng header will be set. I hope that @bshannon can review this as well. |
@pzygielo it updates message-id if it is not set from the API user. The default value for message-id is null. I was able to send mail with custom message-id with setHeader and generated unique message-id by not setting any value. |
I understand why you might want this behavior, but I fear that this change in behavior I think you're stuck using the technique described in the FAQ if you want to set your own |
As I said above, I fear that the compatibility impact of this change is too large, |
First of all, thank you for the explanation and pointing me the right resources.
I understand that, but as a API user one must be aware of that and can set the new message-id while changing the recipient, cannot they?. When user sets the message-id, I would expect user to be aware of the consequences. I think this does not break any existing behavior with the current API but gives the opportunity for API user to choose (setHeader and manage it for each send) or fall-back to the API override (let API generate without setting the header). The problem with current behavior is, API silently overriding the setHeader. Probably, API throwing an exception when setHeader("message-id", "value") is invoked at least gives user some idea that it is not allowed. |
I understand that you think your use case is more important than other existing use cases, Generally there's no need to override the default Message-Id. Why are you finding it necessary |
It is not that, the earlier workaround of extending
I was just letting you know that, this change does not change any of the existing behavior but adds little more flexibility for custom message-id.
okay
For mail threading based on the message headers we wish to utilize custom |
It does change existing behavior. As I explained, if you send the same MimeMessage
Most clients do threading without depending on the Message-Id, since you can't control In any event, you clearly need more control of the MimeMessage object, so creating a |
Currently, the API generates message-id and
uses it overriding the user provided message id.
#432
This fix should be used with setHeader method.
addHeader method has the following issue
#433
leading to the override despite this fix.
Signed-off-by: Venkat [email protected]