Subject: [Jmap] questions about batch of commands and smtpReply string

From: Stéphane Blondon <[email-masked]>
Date: Fri, 11 Jan 2019 21:12:38 +0100

I read the documentation on jmap.io and I have two questions/remarks:

1. Batch of commands
--------------------

Jmap has the ability to get a batch of commands. What is the expected
behaviour if an error occurs in one of the command?
For example, a batch submit 3 e-mails (A, B and C). The e-mail A is
sent, B has an error (invalidEmail for example). Should the server
send e-mail C?
As there is no atomicity for the whole batch, I guess there will be
problems if the batch ignore the error and pass to next command.
However, I didn't found which behaviour is required in the
specification.

2. smtpReply
------------

It's in section 7: Email submission.
Perhaps, it would be easier if it would be an array with the SMTP
reply code, SMTP Enhanced Mail System Status Code and additionnal
infos instead of a string concatening those data by a space.
Example:
550 5.7.1 Our system has detected that this message is likely spam.
would be
[550, "5.7.1", "Our system has detected that this message is likely spam."]

Regards
-- 
Stéphane

---

From: "Neil Jenkins" <[email-masked]>
Date: Sun, 13 Jan 2019 19:08:19 -0500

> behaviour if an error occurs in one of the command?

It is expected to continue with the next command,

3.5.2 Method-level errors <https://jmap.io/spec-core.html#errors>

*If a method encounters an error, the appropriate error response MUST be inserted at the current point in the methodResponses array and, unless otherwise specified, further processing MUST NOT happen within that method call.
*
*
*
*Any further method calls in the request MUST then be processed as normal. Errors at the method level MUST NOT generate an HTTP-level error.*

5.3 /set <https://jmap.io/spec-core.html#/set> (for set-level errors)

*Each creation, modification or destruction of an object is considered an atomic unit. It is permissible for the server to commit changes to some objects but not others*

Neil.