Email

Token-based email templates sent through cbmailservices.

On this page

Email

Email templates use cbmailservices with simple @token@ placeholders, replaced at send time:

<h1>Reset Your Password</h1>
<p>Click the link below to reset your password:</p>
<a href="@linkToken@">Reset Password</a>
<p>This link expires @expiration@.</p>

Sent from a service call:

mailService.newMail()
    .config( from = "noreply@app.com", to = user.getEmail(), subject = "Reset Password" )
    .setBodyTokens( { linkToken: resetLink, expiration: "in 60 minutes" } )
    .setBodyTemplate( "password_verification" )
    .send();

Templates shipped

TemplateSent when
user_welcome.bxmA new account is created
password_verification.bxmA password-reset link is requested
password_reset.bxmConfirmation after a password change

Protocol by environment

Files protocol in development

In development, app/config/modules/cbmailservices.bx writes outgoing mail to disk instead of sending it - nothing leaves your machine while you're building. Configure a real SMTP provider (Postmark, SendGrid, or plain SMTP) for production - see Deployment.

Edit this page Download Markdown Last updated Sep 1, 2026, 7:55:53 PM