Skip to main content

Email Setup

Tracera uses Resend for sending transactional emails (magic links). Email is optional — when not configured, magic link URLs are logged to stdout.

Development Mode

When RESEND_API_KEY is not set, the email sender operates in log mode:
INFO  Magic link for [email protected]: http://localhost:8080/api/v1/auth/magic/verify?token=abc123
Check your server logs for the verification URL. No email configuration needed for local development.

Production Setup

1

Create Resend Account

Sign up at resend.com.
2

Add Sending Domain

Navigate to Domains and add your sending domain. Follow the DNS verification steps (add the provided TXT, MX, and DKIM records).
3

Generate API Key

Go to API Keys and create a new key with sending permissions.
4

Configure Environment

RESEND_API_KEY=re_your_api_key
RESEND_FROM_EMAIL=[email protected]

Configuration

VariableDefaultDescription
RESEND_API_KEY(empty)Resend API key. Log mode if unset.
RESEND_FROM_EMAIL[email protected]Sender email address
MAGIC_LINK_EXPIRY_MINUTES10How long magic link tokens are valid

Email Content

Magic link emails contain:
  • A verification link with a one-time-use token
  • The link expires after the configured duration (default: 10 minutes)
  • Clicking the link authenticates the user and creates a session

Deliverability

For best deliverability in production:
  • Verify your sending domain with SPF, DKIM, and DMARC records
  • Use a custom from address on your verified domain
  • Monitor bounce rates in the Resend dashboard