Skip to main content
better-auth sends auth mail through callbacks you provide — point them at POST /v1/messages/send so verification codes, magic links, and password resets go out through your Gork inbox.
Auth mail is single-recipient by nature, so it fits comfortably on the free sandbox — no custom domain required to start.

Pattern

Wire Gork into better-auth’s email callbacks (sendVerificationEmail, and sendVerificationOTP when using the emailOTP plugin). Each callback receives the recipient and content, then POSTs one message:

Tips

  • Use a dedicated inbox (e.g. auth / no-reply) so auth mail is isolated from agent outreach.
  • Sends are idempotent-safe: pass an Idempotency-Key header keyed on (email, otp) so retries never double-deliver codes.
  • For production volumes on your own domain, verify the domain first (see the Node.js SDK domains section).