Skip to content
  • Our Product
    • Namazu Elements
      • What is Elements?
      • Why open source?
      • Docs
        • Namazu Elements in Five Minutes or Less
        • RESTful APIs Library
        • Security Model
        • Accessing the Web UI (CMS)

    Our Product

    A logomark with three layered rhombuses adorning the lettermark that says Elements in bold all-caps sans-serif letters.
    • What is Namazu Elements? Discover our easy-to-use backend network solution built for online games. Rapidly enables full-scale multiplayer games or online solo adventures.
    • Why open source? Is there a truly open source server backend for connected games? There is now. Download and run a local copy of Namazu Elements and try it for yourself.
    Download Namazu Elements

    Get started

    • Quick start Read our Elements 5-minute quick start guide
    • Documentation Read our developer docs for learning more about Elements
    • RESTful APIs A full list of core API specs for working with the Elements framework
    • Security An overview of the server-authoritative security model of Elements
    • Accessing the CMS Manage your game with ease via the Namazu Elements CMS.

    Co-development Reimagined

    • Best real-time game backends in 2026 If you're researching an alternative to your current backend solution, we've prepared a report of all of the backend solutions on the market in 2026 and how Namazu Elements compares.
      Co-dev

    Recent Posts

    • The watercolor-styled Namazu Studios logo over a giant namazu lurking in the depth
      Namazu Studios Featured in San Diego Business Journal
      22 Sep 2025 Press
    • Namazu Elements 3.1 Released – Service Layer Fixes, Secure APIs, and Steam Bug Fix
      22 Apr 2025 Release Notes
  • Case Studies
  • About Us
  • News
  • Services
  • Book a call
namazu-studios-logo
Book a call
Popular Search Roblox

Getting Started

  • Namazu Elements in Five Minutes or Less
  • Overview
  • Accessing the Web UI (CMS)
  • CMS Feature Overview

Fundamentals

  • Why You Need a Server (and What “Authoritative” Means)
  • Elements as a Game Runtime
  • Where Your Authoritative Code Runs
  • Lifecycles and Flows

General Concepts

  • Custom Elements
  • Data Models
  • Security Model
  • N-Tier Architecture

Namazu Elements Core Features

  • Email Service
  • Applications
  • Sessions
  • Users and Profiles
  • Digital Goods
  • Progress and Missions
  • Progress and Missions (3.4+)
  • Leaderboards
  • Matchmaking – Comprehensive Guide
  • Friends
  • Followers
  • Product Bundles and SKUs
  • Item Ledger
  • Receipts
  • Reward Issuances
  • Save Data
  • Metadata
  • Metadata (3.4+)
  • Queries
  • Application CDN Git Deployment
  • Large Object API
  • Firebase Push Notifications
  • Email Templates
  • Event Reference
  • Element Static Content and Dashboard UI Plugins
  • User Authentication / Sign In
    • What is a User?
    • Email Verification
    • User Authentication in Elements
    • Account Linking
    • Setting Up Twitch OIDC Login (Backend)
    • OIDC Login for Thick Clients (Browser Redirect Flow)
    • Auth Schemes
      • Auth Schemes
      • OAuth2
      • OIDC
  • Features
    • Web3
      • Wallets
      • Vaults
      • Omni Chain Support
      • Smart Contracts
        • Smart Contracts
  • Queries
    • Advanced Operators
    • Object Graph Navigation
    • Boolean Queries
    • Base Query Syntax
  • Advanced Operators
    • .name
    • .ref

Your Game Code - Adding Custom Elements

  • Custom Code Overview
  • Windows Setup
  • Mac OS Setup
  • Ubuntu Linux Setup
  • Element Anatomy: A Technical Deep Dive
  • Introduction to Guice and Jakarta in Elements
  • Structuring your Element
  • Events
  • Packaging an Element with Maven
  • Deploying an Element
  • Preparing for code generation
  • Properties
  • Websockets
  • RESTful APIs
  • Direct MongoDB Access (3.5+)
  • Building the Example Element: A Complete Walkthrough
  • Building the Kotlin Example Element: A Complete Walkthrough

Configuration

  • Configuring External URLs for Deployment
  • Matchmaking – Comprehensive Guide
  • Direct Database Access and Batch Configuration
  • Connecting Namazu Elements to a TLS-Enabled MongoDB Replica Set
  • Batch Samples
    • Mission Upload Bash Script Sample
    • Item Upload Bash Script Sample

RESTful APIs

  • Importing into Postman
  • RESTful APIs Library
  • Swagger and Swagger UI

Add-Ons

  • Crossplay
    • Crossfire Client Libraries (JVM & Browser)
    • Crossfire Protocol Reference
    • Crossfire: Custom Matchmaking Algorithms
    • Namazu Crossfire (Multiplayer)
    • Deploying Namazu Crossfire in your game
  • Roblox
    • Roblox Overview
    • Secure Player Authentication & Registration
    • Global Matchmaking
    • Roblox Security Best Practices
  • Container on Demand
    • Namazu Conductor
    • Namazu Conductor Admin API
    • Configuring Namazu Conductor Providers
    • Streaming Job Stdio in Namazu Conductor
  • Commerce
    • Stripe
      • Stripe
      • Configuring the Stripe Element
      • Stripe REST API Reference
      • Stripe REST API Reference
      • Stripe Webhooks and the Typed Event Bus

Game Engine & Client Support

  • Unity
    • Elements Unity Plugin
    • Unity Crossfire Plugin
  • Gamemaker
    • Incorporating GMEXT-Elements into a GameMaker Project

Troubleshooting

  • Common Issues with Docker
  • Local SDK
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Could not load class : java.lang.NoClassDefFoundError
  • Namazu Elements Community Edition
    • Common Issues with Docker
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Running in the IDE
      • Exception in monitor thread while connecting to server localhost:27017
      • Could not deployAvailableApplications Jetty server Failed to bind to /0.0.0.0:8080 Address already in use

Releases

  • Release Process (3.9+)
  • 3.8 Release Notes
  • 3.9 Release Notes
  • 3.7 Release Notes
  • 3.6 Release Notes
  • 3.5 Release Notes
  • 3.4 Release Notes
  • 3.3 Release Notes
  • 3.2 Release Notes
  • 3.1 Release Notes

Namazu Agent

  • Namazu Agent Overview
  • Common Agent Tasks
  • Tips for Using the Namazu Agent

Namazu Cloud

  • Namazu Cloud Overview
  • Namazu Cloud Organizations
  • Namazu Cloud Subdomains
  • Namazu Cloud Instances
  • Namazu Cloud Products and SKUs
  • Namazu Cloud Add-ons
  • Namazu Cloud Account
  • Namazu Cloud Backups
  • Namazu Cloud Billing
View Categories
  • Home
  • Docs
  • Namazu Elements Core Features
  • Email Templates

Email Templates

Est. read time: 3 min read

AI Doc Summarizer Doc Summary
AI Doc Summarizer Thinking Thinking

Elements version 3.9+

EmailTemplateService is a first-class platform Service that stores the subject and HTML body used by transactional emails as persistent, editable records, addressed by a unique key. It replaces the older approach of hardcoding subject and body as Element attribute defaults, so operators can change wording and styling without a redeploy, and custom Elements can register their own templates without any core platform changes.


Core templates #

Two templates ship with the platform. Their keys use the reserved dev.getelements.elements. prefix and cannot be created or deleted through the API or CMS, only edited:

KeyUsed byVariables
dev.getelements.elements.password_reset.email_templatePassword Reset (PasswordResetService){link} – full password-reset URL
dev.getelements.elements.verification.email_templateEmail Verification{link} – full verification URL

Both are seeded automatically with their built-in defaults the first time they are listed or requested, so they always appear in the CMS even on a brand-new deployment that has never sent either email.


Editing in the CMS #

In the admin dashboard, go to Other > Email Templates. Core templates are marked with a Core badge; their key cannot be edited and they cannot be deleted. For each template you can edit the name, subject, description, and HTML body, and use the preview action to render the body in an iframe with sample values substituted for any documented variables before saving. See CMS Feature Overview for a tour of the surrounding dashboard.


REST API #

MethodPathDescription
GET/email_templatePaginated list (offset, count query params).
GET/email_template/{idOrKey}Fetch by id or by key.
POST/email_templateCreate a new template. Rejected if key uses the reserved prefix.
PUT/email_template/{id}Update name, subject, description, or body. The key is immutable after creation.
DELETE/email_template/{id}Delete a template. Rejected for reserved (core) keys.

All endpoints require a Superuser Session.


Using EmailTemplateService in custom Elements #

EmailTemplateService is exported to Element child injectors, so it can be injected directly, no additional ELM dependency is needed. Custom Elements register and fetch their own templates with getOrCreateEmailTemplate, an Idempotent call that creates the row with the given defaults the first time it is seen and simply returns the existing row on every call after that (including after an operator has edited it in the CMS):

☕
filename.js
import dev.getelements.elements.sdk.Service.schema.email.EmailTemplateService;
import dev.getelements.elements.sdk.Service.email.EmailService;
import Jakarta.inject.Inject;
import Jakarta.inject.Named;

import static dev.getelements.elements.sdk.Service.Constants.UNSCOPED;

public class WelcomeEmailService {

    private static final String WELCOME_EMAIL_KEY = "com.mystudio.mygame.welcome_email";

    private EmailTemplateService emailTemplateService;

    private EmailService emailService;

    public void sendWelcome(String toAddress, String displayName) {

        final var template = emailTemplateService.getOrCreateEmailTemplate(
            WELCOME_EMAIL_KEY,
            "Welcome Email",
            "Welcome to the game!",
            "<h2>Welcome, {name}!</h2><p>Thanks for joining. Good luck out there.</p>");

        final var body = template.getBody().replace("{name}", displayName);
        emailService.send(null, toAddress, template.getSubject(), body, true);
    }

    @Inject
    public void setEmailTemplateService(@Named(UNSCOPED) EmailTemplateService emailTemplateService) {
        this.emailTemplateService = emailTemplateService;
    }

    @Inject
    public void setEmailService(EmailService emailService) {
        this.emailService = emailService;
    }
}

Because getOrCreateEmailTemplate only supplies its defaults the first time a key is seen, the template immediately becomes editable in the CMS under Other > Email Templates, right alongside the core templates, with no additional registration step. Use your own reverse-DNS key (e.g. com.mystudio.mygame.welcome_email), not the reserved dev.getelements.elements. prefix, which is rejected outside of this internal call.

Unlike the two core templates, there is no platform-wide registry of what variables a custom template supports. Document them for your own team elsewhere (e.g. in your Element’s own README), since the CMS only shows a variables reference for the core templates listed above.


See also #

  • Email Service – the underlying SMTP transport used to actually send the rendered subject and body.
  • Email Verification – one of the two core templates, including token lifecycle and REST endpoints.
  • CMS Feature Overview – a tour of the admin dashboard, including where Email Templates lives in the sidebar.

Core Features
What are your Feelings
Still stuck? How can we help?

How can we help?

Updated on September 23, 2026
Firebase Push NotificationsEvent Reference
Table of Contents
  • Core templates
  • Editing in the CMS
  • REST API
  • Using EmailTemplateService in custom Elements
  • See also
  • Documentation
  • Terms of Service
  • Privacy Policy
  • Contact us
  • Linkedin
  • Join our Discord

Namazu Studios LLC is powered by Namazu Elements, an open source modular backend framework for connected games.

Namazu Elements
  • Download
  • About Elements
  • Open source
  • Documentation
  • Support
Namazu Studios
  • Case Studies
  • About Us
  • News
Best realtime game backends 2026
Get in Touch
  • info@namazustudios.com
  • Book a call
  • (619) 862-2890
  • Linkedin
  • Discord

©2008-2026 Namazu Studios. All Rights Reserved.