[ 
https://issues.apache.org/jira/browse/JAMES-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benoit Tellier closed JAMES-3566.
---------------------------------
    Resolution: Fixed

> EmailSubmission/set does an Email/set implicit call when no onSuccess 
> properties
> --------------------------------------------------------------------------------
>
>                 Key: JAMES-3566
>                 URL: https://issues.apache.org/jira/browse/JAMES-3566
>             Project: James Server
>          Issue Type: Bug
>          Components: JMAP
>    Affects Versions: 3.6.0
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>             Fix For: 3.7.0, 3.6.1
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code:java}
> {
>   "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail", 
> "urn:ietf:params:jmap:submission"],
>   "methodCalls": [
>      ["EmailSubmission/set", {
>        "accountId": "$ACCOUNT_ID",
>        "create": {
>          "k1490": {
>            "emailId": "${messageId.serialize}",
>            "envelope": {
>              "mailFrom": {"email": "${BOB.asString}"},
>              "rcptTo": [{"email": "${ANDRE.asString}"}]
>            }
>          }
>     }
>   }, "c1"]]
> }
> {code}
> Returns:
> {code:java}
> {
>     "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
>     "methodResponses": [
>         [
>             "EmailSubmission/set",
>             {
>                 "accountId": 
> "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
>                 "newState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
>                 "notCreated": {
>                     "k1490": {
>                         "type": "forbiddenMailFrom",
>                         "description": "Attempt to send a mail whose 
> MimeMessage From and Sender fields not allowed for connected user: 
> List([email protected])"
>                     }
>                 }
>             },
>             "c1"
>         ],
>         [
>             "Email/set",
>             {
>                 "accountId": 
> "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
>                 "oldState": "668a394e-a324-4d3d-bef0-945ae79f18c8",
>                 "newState": "668a394e-a324-4d3d-bef0-945ae79f18c8"
>             },
>             "c1"
>         ]
>     ]
> }
> {code}
> The empty Email/set call should not be performed when no onSuccessXXX 
> properties is specified.
> Thus this would be more appropriate:
> {code:java}
> {
>     "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
>     "methodResponses": [
>         [
>             "EmailSubmission/set",
>             {
>                 "accountId": 
> "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
>                 "newState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
>                 "notCreated": {
>                     "k1490": {
>                         "type": "forbiddenMailFrom",
>                         "description": "Attempt to send a mail whose 
> MimeMessage From and Sender fields not allowed for connected user: 
> List([email protected])"
>                     }
>                 }
>             },
>             "c1"
>         ]
>     ]
> }
> {code}
> Reported by Tung on Gitter...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to