Modelence sends transactional emails — verification, password reset, and any custom emails you trigger viaDocumentation Index
Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
Use this file to discover all available pages before exploring further.
sendEmail — through a built-in managed email provider. No provider setup, no API keys, no SMTP credentials. Apps connected to Modelence Cloud get email working immediately.
If you outgrow the managed provider or need custom domains, attachments, or full deliverability control, you can swap in a custom provider (Resend, Amazon SES, or SMTP) at any time.
Built-in Managed Email (Default)
Built-in managed email requires
modelence v0.18.0 or newer. Earlier versions still require you to configure a provider explicitly. Update with npm install modelence@latest.provider to startApp.
Minimum setup
sendEmail for custom transactional messages (see Sending Custom Emails).
How it works
- Outbound mail is relayed through Modelence Cloud (
/api/email/send), which sends via Resend on a Modelence-owned domain. - You can still pass
from: '"Your App" <noreply@anything>'to set a friendly name; the address part is replaced by the managed sender. ThereplyTofield works normally so users can still reply to your support inbox. - Local development (no Modelence Cloud connection) falls back to the legacy “no provider configured” behavior so misconfigurations fail loudly during development.
Limitations in v1
The managed provider focuses on the common transactional case. It does not support:cc/bccrecipients- File attachments
- Custom email headers
- Custom sender domains
sendEmail with any of these, Modelence throws a clear error. Use a custom provider when you need them.
Custom Email Templates
You can customize the HTML for verification and password reset emails. Templates work the same whether you use the built-in provider or a custom one:Sending Custom Emails
UsesendEmail to send arbitrary transactional emails — order confirmations, invites, notifications, anything you trigger from your own code. It routes through whichever provider is active (managed or custom), so the call site stays the same.
Basic example
Calling sendEmail from a mutation
A typical use case — sending a notification when a user completes an action:
Plain-text and multipart emails
Providetext for clients that don’t render HTML, or both html and text for a multipart message:
Sending to multiple recipients
Email Payload Options
html or text (or both). Fields marked custom provider only are rejected by the built-in managed provider — see Custom Email Providers if you need them.
Troubleshooting
Error: “Modelence managed email does not support cc, bcc, attachments, or custom headers”
The built-in managed provider does not support these fields in v1. Either remove them from yoursendEmail call, or configure a custom provider (Resend, SES, or SMTP).
Error: “Email provider is not configured”
You’re running locally without a Modelence Cloud connection and haven’t set aprovider. Either:
- Connect your app to Modelence Cloud to use the managed provider, or
- Configure a custom provider.
Next Steps
- Use a custom email provider for attachments, custom domains, or specific vendor requirements
- Learn about Authentication to understand how email verification works
- Explore User Management features
- Review the API Reference for more details on email functions