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

JAMES-3962 JMAP Email/set: move EmailHeader[] from bodyValues to htmlBody/textBody #2659

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

vttranlina
Copy link
Contributor

Currently, the client sends a JSON request with headers: EmailHeader[] under the bodyValues property, structured as follows:

"bodyValues": {
                 "a49d": {
                 "value": "$htmlBody",
                  "isTruncated": false,
                  "isEncodingProblem": false,
                  "header:Specific:asText": "MATCHME"
                  }
               }

However, according to RFC 8621, EmailBodyValue does not reference headers property.
image

Instead, headers are mentioned in the EmailBodyPart.
image
The example in the RFC is also similar.

To align with the RFC specification, we need to update the mapping.
This change will also support cases where the email part uses blobId instead of partId, while still allowing the client to set headers.

@chibenwa
Copy link
Contributor

Good catch

Copy link
Contributor

@Arsnael Arsnael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this change be documented somewhere?

@vttranlina
Copy link
Contributor Author

Shouldn't this change be documented somewhere?

The James document is already similar to rfc8621
https://github.com/apache/james-project/blob/master/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown?plain=1#L1249

@Arsnael
Copy link
Contributor

Arsnael commented Feb 28, 2025

Yes but I meant more for clients using already jmap, if we move a field in the response?

@vttranlina
Copy link
Contributor Author

Yes but I meant more for clients using already jmap, if we move a field in the response?

sorry, but I'm confused what should I do?

Copy link
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for avoiding breaking change...

@Arsnael
Copy link
Contributor

Arsnael commented Feb 28, 2025

sorry, but I'm confused what should I do?

Add an entry in upgrade-instructions.md?

@chibenwa
Copy link
Contributor

Not sure, we only better conform to the RFC...

@vttranlina vttranlina force-pushed the jmapEmailSetBlobId branch from 778dad3 to 5e873e9 Compare March 4, 2025 01:56
@vttranlina
Copy link
Contributor Author

rebase & squash

@chibenwa chibenwa merged commit bd6072c into apache:master Mar 4, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants