Magistrala
Dev GuideServices

Notifications

How Magistrala sends workspace-invitation emails today — via Atom's built-in mail sender, not a standalone Magistrala service.

No longer a standalone Magistrala service

There is no standalone Notifications service, Users service, or NATS-driven event flow. Invitation emails are now sent by Atom itself, synchronously, as part of handling the invitation — not by a separate event-driven Magistrala service.

When a user is invited to a workspace, Atom renders and sends the invitation email inline — there's no event stream, no gRPC call to a Users service, and nothing for Magistrala to deploy or configure for this to work. The old asynchronous, NATS-driven, cross-service design this page previously described does not exist anymore.

How it works

Atom ships three built-in email templates (verification, password reset, invitation) as .tmpl files — a Subject: header line, an optional Content-Type: header line, a blank line, then a minijinja-templated body. Sending an invitation email calls mail::send_templated_email with the Invitation template kind and the invitation URL as the single templated variable.

Configuration

Set on Atom, not on any Magistrala service:

VariableDescription
ATOM_SMTP_HOSTSMTP server host — SMTP is considered unconfigured if unset
ATOM_SMTP_FROMSender address
ATOM_SMTP_TLSnone, tls, or starttls (default)
ATOM_EMAIL_TEMPLATES_DIRDirectory checked first, one file at a time, before the built-in default — override only the templates you need
ATOM_ALLOW_UNVERIFIED_EMAIL_LOGINDevelopment-only: if SMTP isn't configured, log the invitation URL instead of failing, rather than sending it

If SMTP isn't configured and the dev bypass isn't set, sending fails outright rather than silently dropping the email.

What's genuinely gone

  • The old event-driven architecture (domains service → NATS → notifications service → users service gRPC → SMTP) — replaced by a direct in-process send inside Atom.
  • SMPP/SMS notifications, and the generic (non-invitation) SMTP notifier — those lived in Magistrala's own consumers/notifiers package, which still exists as source but isn't wired into any running service; see Consumers § Notifiers.

On this page