-
Notifications
You must be signed in to change notification settings - Fork 17
Implement MDN/send
method/response
#43
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dab246
reviewed
Oct 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use MDN/send
Header
Accept: application/json; charset=UTF-8; jmapVersion=rfc-8621
Request
{
"using": [
"urn:ietf:params:jmap:mail",
"urn:ietf:params:jmap:mdn",
"urn:ietf:params:jmap:core"
],
"methodCalls": [
[
"MDN/send",
{
"accountId": "{{accountId}}",
"identityId": "{{identityId}}",
"send": {
"k1546": {
"forEmailId": "31ed5fe0-4486-11ed-b412-4700d9090322",
"subject": "Subject MDN/send",
"textBody": "Hello MDN/send",
"disposition": {
"actionMode": "manual-action",
"sendingMode": "mdn-sent-manually",
"type": "displayed"
}
}
},
"onSuccessUpdateEmail": {
"#k1546": {
"keywords/$mdnsent": true
}
}
},
"0"
]
]
}
Response
- If the email id matches an existing email message without the
$mdnsent
keyword, the server can answer:
{
"sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
"methodResponses": [
[
"MDN/send",
{
"accountId": "0d14dbabe6482aff5cbf922e04cef51a40b4eabccbe12d28fe27c97038752555",
"sent": {
"k1546": {
"originalRecipient": "rfc822; [email protected]",
"finalRecipient": "rfc822; [email protected]",
"includeOriginalMessage": false
}
}
},
"0"
],
[
"Email/set",
{
"accountId": "0d14dbabe6482aff5cbf922e04cef51a40b4eabccbe12d28fe27c97038752555",
"oldState": "324b8570-4486-11ed-b412-4700d9090322",
"newState": "324b8570-4486-11ed-b412-4700d9090322",
"updated": {
"31ed5fe0-4486-11ed-b412-4700d9090322": null
}
},
"0"
]
]
}
- If the
$mdnsent
keyword has already been set, the server can answer an error:
{
"sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
"methodResponses": [
[
"MDN/send",
{
"accountId": "0d14dbabe6482aff5cbf922e04cef51a40b4eabccbe12d28fe27c97038752555",
"sent": {
"k1546": {
"originalRecipient": "rfc822; [email protected]",
"finalRecipient": "rfc822; [email protected]",
"includeOriginalMessage": false
}
}
},
"0"
],
[
"Email/set",
{
"accountId": "0d14dbabe6482aff5cbf922e04cef51a40b4eabccbe12d28fe27c97038752555",
"oldState": "324b8570-4486-11ed-b412-4700d9090322",
"newState": "324b8570-4486-11ed-b412-4700d9090322",
"updated": {
"31ed5fe0-4486-11ed-b412-4700d9090322": null
}
},
"0"
]
]
}
125e612
to
8ab5958
Compare
dab246
reviewed
Oct 6, 2022
still not have test |
To get
|
8ab5958
to
a8bab3d
Compare
a8bab3d
to
5f65f07
Compare
dab246
reviewed
Oct 7, 2022
sherlockvn
commented
Oct 10, 2022
hoangdat
approved these changes
Oct 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
linagora/tmail-flutter#878