PushHub Email Delivery

Provider strategy

PushHub sends transactional email through the backend IEmailService.

Production priority:

  1. Resend API, when RESEND_API_KEY is configured.
  2. SMTP, when EMAIL_SMTP_HOST is configured and Resend is not configured.
  3. Log fallback, when neither provider is configured or the setup email provider fails.

The fallback intentionally logs the setup-password CTA for operational recovery, but it does not deliver email to the company owner.

Resend configuration

Required production variables:

EMAIL_FROM_EMAIL=noreply@pushhub.kemegames.com
EMAIL_FROM_NAME=PushHub
RESEND_API_KEY=re_...
RESEND_API_URL=https://api.resend.com/emails

The sender domain used by EMAIL_FROM_EMAIL must be verified in Resend before real delivery. Configure the SPF/DKIM/DMARC records that Resend provides for the domain, then verify the domain in the Resend dashboard.

Trial approval behavior

When a Keme admin approves a trial request:

  1. PushHub provisions the company, inactive owner user, owner membership, and setup-password token.
  2. PushHub sends the setup-password CTA through Resend when RESEND_API_KEY is configured.
  3. PushHub records the setup-email outcome on the trial request: Sent, Fallback, or Failed, plus attempt count, provider, provider message id when available, attempt time, and last error.
  4. If delivery is not configured or fails, PushHub logs [EMAIL:FALLBACK] with the setup CTA so support can recover manually.

Approved requests can also use the Keme Admin Resend setup action. This creates a fresh setup-password token, invalidates existing open setup tokens for the owner, and sends the new CTA through the configured email provider.

Approved requests can use the Keme Admin Setup link recovery action when real email is blocked. This is a super-admin-only manual fallback. It creates a fresh seven-day setup-password token, invalidates older open setup tokens for the owner, audits the action, and returns the raw setup URL only in that response. Do not paste this link into shared tickets or documentation.

Verification

After configuring Resend:

  1. Recreate the API container so it receives the new env variables.
  2. Submit a trial request from the marketing website.
  3. Approve it in Keme Admin.
  4. Confirm API logs contain [EMAIL:RESEND].
  5. Confirm the recipient receives the setup-password email.
  6. Confirm Keme Admin shows setup email status Sent.

For an already-approved request, open Keme Admin โ†’ Trial Requests โ†’ switch filter to Approved โ†’ click Resend setup.

If Resend is not configured yet, the admin table should show Manual action. Use Setup link only as an operational recovery path while DNS/API-key setup is being completed.