Sending Emails

Use email to verify users, send magic links, and invite teammates to organizations. Some features will not work unless email sending is enabled.

Why it matters

  • Email verification improves account security and deliverability.
  • Magic links allow passwordless sign-in.
  • Invitations are required for organization/team workflows.

Activate email sending

src/convex/auth.constants.ts

Brand your emails

Add your brand name and your brand tagline to convex as env variables, they will be used in your emails.

Tip: If you deploy to multiple environments (development/production), set these variables in each environment.

Configure Resend

We use Resend to send transactional emails (verification, invites, magic links).

Create a Resend Account & Key

  1. Sign up at https://resend.com
  2. In the dashboard → API Keys, generate a new key.
  3. In your Convex project, set the key:
    Or add RESEND_API_KEY in the Convex dashboard under Environment Variables.
  • In Resend, go to “Domains” and add your sending domain (e.g. example.com).
  • Follow the DNS instructions to set up DKIM. This significantly improves deliverability and prevents spam issues.
  • Configure a from address (e.g. noreply@example.com).
  • Set the from address in Convex:

Enable Webhook for Analytics

  • In Resend’s Webhooks section, add a new endpoint pointing to:
  • Select email.* events only; all others are ignored.
  • Copy the Signing Secret and set it in Convex:

    🔧 The @convex-dev/resend package automatically provides a /resend-webhook POST handler. No extra code needed.

For more information see Convex Resend.

Test it

  • With sendEmails: true and RESEND_API_KEY set, try one of the email flows:
    • Email verification
    • Magic link sign-in
    • Organization invite
  • Check your inbox, and if you don’t see the email, inspect the Resend dashboard and Convex logs.

Troubleshooting

  • Emails not arriving:
    • Confirm sendEmails is spelled correctly in src/convex/auth.constants.ts.
    • Verify RESEND_API_KEY is present in the correct environment.
    • Complete domain verification and DKIM setup in Resend for better deliverability.
    • Check spam/junk folders.
  • Webhook signature errors:
    • Ensure you copied the current Resend Webhook Signing Secret and set RESEND_WEBHOOK_SECRET.
    • Only subscribe to email.* events.