Email that just works.
Send transactional and notification emails through Resend, SMTP, or SendLayer. Templates with variable interpolation, encrypted credentials, and database-managed providers. All built in.
What it does
Nextly's email system handles transactional emails for authentication flows (welcome, password reset, email verification) and supports custom email sending through a provider-agnostic API.
You can configure an email provider in code viadefineConfig()or manage providers directly from the admin panel. Database-configured providers take priority over code config, so you can update credentials without redeploying. All credentials are encrypted at rest with AES-256-GCM.
The template engine supports{{placeholder}}variable interpolation with HTML escaping and dot notation for nested values. Three built-in templates cover common auth flows, and you can create custom templates for any purpose.
Three Providers
Resend (modern API), SMTP (any server via nodemailer), or SendLayer (REST API). Switch providers without changing your sending code.
Template System
Built-in templates for welcome, password reset, and email verification. Variable interpolation with {{placeholders}} and HTML layout composition.
Encrypted Credentials
Provider credentials are encrypted at rest with AES-256-GCM. The admin API returns masked values, and secrets never leave the server.
Database-Configured Providers
Create, test, and switch providers from the admin panel. Set a default provider and override per-email when needed. Code config works as fallback.
Pick your provider
All three providers share the same sending API, so you can switch without changing code.
Resend
Modern API, Resend SDK
{
provider:"resend",
apiKey:"re_xxxxx",
}SMTP
Any SMTP server via nodemailer
{
provider:"smtp",
host:"smtp.gmail.com",
port: 587,
auth: {
user:"...",
pass:"...",
},
}SendLayer
REST API, native fetch
{
provider:"sendlayer",
apiKey:"xxxxx",
}Email provider setup
import { defineConfig } from"@revnixhq/nextly/config";
export default defineConfig({
email: {
providerConfig: {
provider:"resend",
apiKey: process.env.RESEND_API_KEY!,
},
from:"My App <noreply@example.com>",
baseUrl:"https://example.com",
resetPasswordPath:"/auth/reset-password",
verifyEmailPath:"/auth/verify-email",
},
});Provider priority: admin-configured provider code config error. You can manage providers from the admin panel and override the code config at any time.
Built-in templates with variables
Three built-in templates for common auth flows. Each supports variable interpolation with{{placeholders}}and is wrapped in a shared HTML layout.
Sending a templated email
await emailService.sendWithTemplate("password-reset","user@example.com", {
resetLink:"https://example.com/reset?token=abc123",
expiresIn:"1 hour",
appName:"My App",
userName:"John Doe",
});Variables are HTML-escaped by default to prevent XSS. Dot notation supported:{{user.name}}resolves nested values.
Which provider to use
| Feature | Resend | SMTP | SendLayer |
|---|---|---|---|
| Setup | 1 API key | Host, port, auth | 1 API key |
| Library | Resend SDK | nodemailer | Native fetch |
| Best for | Production SaaS | Self-hosted / Enterprise | Resend alternative |
Start building with Nextly
Free, open source, and yours to own. No sign-up required.
npx create-nextly-app@latest