How Mailocity and Zappocity send their own mail
Both services send mail of their own: Mailocity its notices (invitations, reset links, security alerts), Zappocity its account mail (confirmation and reset links). Each can send as a real mailbox, so the mail is signed, counted and archived like any other.
Mailocity's notices
Under Settings → Notice mail (corpsuite notice-mail set):
- From the notice address (the default, as before): from
noticeFromunder Signup, delivered or queued directly. - As a mailbox here: pick a mailbox, such as
noreply@mailo.city. Notices go through the same checks and limits as mail its user sends. - Over JMAP as a mailbox: pick a mailbox here (a token named Mailocity notices is made for it), or give another Mailocity's address and a mailbox token there with send and jmap. Notices go through the same checks and limits as that mailbox's own mail, and each one is also kept in its Sent folder. The token is stored encrypted and never shown.
- By SMTP submission: a host, port, STARTTLS or TLS, and a mailbox's address with an app password. The password is stored encrypted.
sudo corpsuite notice-mail set mode=jmap account=noreply@mailo.city
sudo corpsuite notice-mail test to=you@example.com
Zappocity's mail
Under Settings → Zappocity mail (corpsuite zappocity mail set):
- Over JMAP as a Mailocity mailbox (recommended): Mailocity's address (such as
https://mailo.city) and a mailbox API token with the jmap scope. Zappocity sends with JMAP's own submission (RFC 8621), so the mail is filed in the mailbox's Sent folder, and it works the same when Zappocity and Mailocity run as separate services. - Through Mailocity here (the default until JMAP is set up): as Mailocity's notices, under Zappocity's sender name.
- By SMTP submission, as above.
The help desk's mail goes out from each queue's own mailbox over JMAP (see the help desk).
sudo corpsuite mailbox token add noreply@zappo.city name="Zappocity mail" scopes:='["jmap"]'
sudo corpsuite zappocity mail set mode=jmap apiUrl=https://mailo.city apiToken=-
sudo corpsuite zappocity mail test to=you@example.com
Send test in the panel (and ... test) sends a message the chosen way and shows the error if it fails.
Mailbox API tokens
Next to a user in the admin panel, API tokens makes tokens (cs_mt_...) for that mailbox. A token is shown once; only its hash is kept. Each token allows one or both of:
- send:
POST /api/mail/send(a simple send API for other services; Zappocity itself uses JMAP) withAuthorization: Bearer cs_mt_...and{"to": [...], "subject": ..., "text": ..., "fromName": ...}sends a plain-text message from the mailbox's address, through the same checks and limits as its user's mail (up to 50 recipients, each sent their own copy). It is archived like other sent mail but not filed in Sent. - jmap: signs in to JMAP as the mailbox with the same header, for services that read and answer its mail, such as the support desk.
Revoke a token there (corpsuite mailbox token revoke) and whatever uses it stops at once. Tokens show when they were made, by whom and when they were last used.