You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had a conversation about where the "Send" button ought to be placed, either at the bottom (same as GMail) or in the top right corner (same as Apple Mail):
it seems more natural in terms of email writing flow (pick To/CC, write a subject, write the email, send it), to have the Send button at the bottom as in the current mockups, to avoid having to move the finger to the top
but that also bears a greater risk of accidentally hitting that Send button while writing the email, whereas having it at the top reduces that risk, precisely because one has to move their finger to the top, out of the way of the email body
After discussion, we tend to favour the top corner option.
This was submitted as a comment to the design agency.
Best practices in JMAP seem to recommend the following approach when creating and updating drafts:
create a new email using Email/set (or POST /groupware/accounts/{accountId}/emails using the Groupware API), with mailboxIds containing the ID of the Mailbox with the "role":"draft" property (e.g. {"mailboxIds":{"a":true}}), which sends back an Email id (as well as a blobId and threadId)
when explicitly or implicitly (autosave after 5min) updating the draft, create a new email using Email/set, adding "destroy":{"..."}to delete the previous draft (that's the PUT /groupware/accounts/{accountId}/emails/{emailId} endpoint in the Groupware)
The Email id of the draft is thus going to change over time (actually every time it is autosaved), and the UI needs to be able to update the corresponding property in the current URL (as a "replace" operation, to prevent the previous ID to still be in the browser history.)
When an Email is sent using EmailSubmission/set (not in the Groupware API yet at the time of writing), it can include a "transactional" operation to either
delete the draft email (onSuccessDestroyEmail)
update the draft email (onSuccessUpdateEmail)
after it has been sent successfully.
The latter seems more likely, in order to then modify the draft to
move it from the Drafts to the Sent folder
remove the $draft flag
If the draft is destroyed: once the email has actually been sent, the draft email ID in the browser history refers to a non-existent email, to which the UI request to load that email (GET /groupware/accounts/{accountId}/emails/{emailId}) will return a 404.
But if the draft is moved to the Sent mailbox, then the ID refers to an existing email, albeit an Email that is not a draft (does not have the $draft keyword), the UI request to load it will succeed.
The UI should thus probably always check that the draft... is indeed a draft, when loading it.
Sending an email by its ID (it must first be created as a draft using the endpoint POST /groupware/accounts/{accountId}/emails as described in my comment above:
POST /groupware/accounts/{accountId}/emails/{emailId}?identity={identityId}&move-from={draftMailboxId}&move-to={sentMailboxId}
Activity
pbleser-oc commentedon Oct 29, 2025
We had a conversation about where the "Send" button ought to be placed, either at the bottom (same as GMail) or in the top right corner (same as Apple Mail):
After discussion, we tend to favour the top corner option.
This was submitted as a comment to the design agency.
pbleser-oc commentedon Oct 29, 2025
Best practices in JMAP seem to recommend the following approach when creating and updating drafts:
Email/set(orPOST /groupware/accounts/{accountId}/emailsusing the Groupware API), withmailboxIdscontaining the ID of the Mailbox with the"role":"draft"property (e.g.{"mailboxIds":{"a":true}}), which sends back an Emailid(as well as ablobIdandthreadId)Email/set, adding"destroy":{"..."}to delete the previous draft (that's thePUT /groupware/accounts/{accountId}/emails/{emailId}endpoint in the Groupware)The Email
idof the draft is thus going to change over time (actually every time it is autosaved), and the UI needs to be able to update the corresponding property in the current URL (as a "replace" operation, to prevent the previous ID to still be in the browser history.)When an Email is sent using
EmailSubmission/set(not in the Groupware API yet at the time of writing), it can include a "transactional" operation to eitheronSuccessDestroyEmail)onSuccessUpdateEmail)after it has been sent successfully.
The latter seems more likely, in order to then modify the draft to
$draftflagIf the draft is destroyed: once the email has actually been sent, the draft email ID in the browser history refers to a non-existent email, to which the UI request to load that email (
GET /groupware/accounts/{accountId}/emails/{emailId}) will return a404.But if the draft is moved to the Sent mailbox, then the ID refers to an existing email, albeit an Email that is not a draft (does not have the
$draftkeyword), the UI request to load it will succeed.The UI should thus probably always check that the draft... is indeed a draft, when loading it.
pbleser-oc commentedon Oct 29, 2025
When creating/replacing an Email (draft), the body can either
bodyStructureandbodyValuesproperties (see JMAP Emails Examples)textBody,htmlBody,attachmentsandbodyValuespropertiesHere an example of the latter (the "simple" format), which can be sent to the following endpoint:
Body:
{ "mailboxIds": { "a": true }, "keywords": { "$draft": true }, "to": [{"name": "Camina Drummer", "email":"[email protected]"}], "subject": "Oye Beltalowda", "textBody": [ {"partId": "t123", "type": "text/plain"} ], "htmlBody": [ {"partId": "h456", "type": "text/html"} ], "bodyValues": { "t123": { "value": "Oye, Beltalowda, this is your bosmang speaking." }, "h456": { "value": "<html><body><p>Oye, Beltalowda.</p><p>This is your bosmang speaking.</p></body></html>", }, }, "attachments": [ { "blobId": "<id of a blob that was already uploaded>", "name": "map.jpg", "type": "image/jpeg", "disposition": "attachment" } ] }200 OKresponse body:{ "id": "leaaaagl", "blobId": "cav10yznxf7fgmvtnadyje9fpwjqzpeuq0yge0othawc1g97usjmwaiazmaq", "threadId": "cz", "size": 288 }pbleser-oc commentedon Dec 4, 2025
Sending an email by its ID (it must first be created as a draft using the endpoint
POST /groupware/accounts/{accountId}/emailsas described in my comment above:(the query parameter
identityis mandatory)