Results Email System

An automated post-event email engine that drives fighters back to your website, boosts engagement, and increases return registrations.

Why This Matters

Every results email is a marketing touchpoint disguised as a notification.

Retention

Bring Fighters Back

Every button in the email links back to your website — fighter profiles, rankings, event pages — creating multiple reasons to return.

Growth

Promote Upcoming Events

Include up to 3 upcoming event flyers directly in the email. Fighters see what's next while they're most engaged.

Content

User-Generated Media

The "Submit Photos & Videos" button lets fighters upload bout media directly, building your content library without any effort.

End-to-End Flow

From template design to fighter inbox — the complete pipeline.

1. Design Template Sanctioning Page → "Results Email" button
CustomResultsEmails.tsx
Pick Theme Light / Earth / Dark
Header & Footer Drag-and-drop Unlayer editor
Toggles Rankings, Media Upload, Upcoming Events
2. Save Template Reusable & set as default
3. Apply to Events Select events & deploy
4. Process Results Event Results Page → "Process Bout"
AddBoutToRecord.tsx
5a. Resend API React Email template
or custom HTML
5b. AWS SES Default fallback
(no custom template)
6. Fighter Inbox Personalized results email with all configured buttons & content
7. Resend Webhooks Track: opened, clicked, bounced, spam, unsubscribed

Email Anatomy

Every section of the email and the action it drives.

Step-by-Step Guide

How to configure and deploy a results email.

Open the Results Email Editor

Go to your Sanctioning Page → click the "Results Email" button. This opens the CustomResultsEmails configuration panel.

Choose a Theme

Select from Light, Earth, or Dark themes. Each adjusts background colors, text colors, and button styling across the entire email.

Set Your Accent Color

Pick a brand color for buttons, links, and accent elements. This single color cascades through all interactive elements in the email.

Design Custom Header & Footer

Click "Edit Header" or "Edit Footer" to open the Unlayer drag-and-drop email builder. Add rich content — images, text, buttons, columns — without writing code.

Configure Feature Toggles

Enable or disable these features:

  • Rankings Button — Links to your rankings page
  • Submit Photos & Videos — Auto-generates secure per-bout upload links with HMAC tokens
  • Promote Upcoming Events — Select up to 3 upcoming events with flyer images

Preview & Test

Click "Preview Email" to see a rendered version. Enter an email address and send a test email to yourself before deploying.

Save as Template

Click "Save Current" to store your configuration as a reusable template. Set it as the default so it auto-loads next time.

Deploy to Events

In the "Apply to Events" section, select the events you want and click "Save". The email template settings are written to each event document.

Process Results

On the Event Results page, click "Process" on each bout (or "Add All Bouts To Records"). Each processed bout automatically sends the results email to both fighters via the API.

Engagement Buttons & Links

Every clickable element in the email and how it drives traffic.

Button / Link Destination Business Impact
Rankings Rankings page (e.g. pmtwest.org/rankings) Drives competitive fighters to check standings, explore peers, and register for next events to improve rank
My Profile Fighter's TechBouts profile Fighters review/share their record, increasing page views and social sharing
Submit Photos & Videos Bout media upload page (HMAC-secured) Builds your media library with user-generated content at zero cost
Event Page Event detail page on TechBouts Fighters revisit event info, share results with their network
Promotion Page Promoter's page on TechBouts Increases promoter brand visibility and page traffic
Upcoming Event Flyers Events listing or direct event link Directly promotes future events while fighters are most engaged post-competition
Contact Email mailto: link to support/contact Enables DQ appeals and support inquiries
Powered by TechBouts techbouts.com homepage Brand awareness for the platform

All Customization Options

Everything you can configure in the Results Email editor.

Visual

Theme & Branding

  • 3 themes: Light, Earth, Dark
  • Custom accent/brand color
  • Custom logo URL override
  • Contact email override
Content

Header & Footer

  • Unlayer drag-and-drop editor
  • Rich HTML: images, columns, text, buttons
  • Design JSON saved for re-editing
  • Fallback: plain-text messages
Features

Toggle-able Sections

  • Rankings button (with custom URL)
  • Media upload button (auto or custom URL)
  • Upcoming events section (up to 3 events)
  • Events page link base URL
Management

Templates

  • Save unlimited named templates
  • Set a default template
  • Edit or delete saved templates
  • Apply to multiple events at once

DQ Handling

Disqualified fighters receive a different email variant automatically.

Standard Result

Shows a green success banner: "Your Updated Record is Now Available"

Standard buttons: Rankings, Profile, Media Upload.

DQ Result

Shows a red warning banner explaining the DQ and its implications:

  • Instructions to email for DQ review
  • Registration block notification
  • Automatic suspension record created

Webhook Tracking (Resend)

Monitor email engagement and protect deliverability.

Email Sent via Resend resend.emails.send()
Delivered Reached inbox
Opened Fighter viewed it
Clicked Which button?
Bounced Bad email — fighter didn't get results
Spam Complaint Stop sending to protect reputation
Unsubscribed Respect & suppress

Click tracking identifies each button: The webhook endpoint at /api/emails/webhooks maps clicked URLs to named buttons (rankings_button, profile_button, media_upload_button, upcoming_event_flyer, event_page_link, promotion_page_link, sponsor_link) so you can measure exactly which CTAs drive the most traffic.

Technical Architecture

Files, data flow, and system components.

app/
  sanctioning/[sanctioningId]/
    PageClient.tsx ← "Results Email" button opens editor

  events/[promoterId]/[eventId]/results/
    AddBoutToRecord.tsx ← processes bouts & triggers email send

  api/emails/
    resultEmail/
      route.ts ← sends email via Resend or SES
      preview/route.ts ← renders preview HTML
    webhooks/
      route.ts ← receives Resend webhook events

components/
  sanctioning/
    CustomResultsEmails.tsx ← full email editor UI
    UnlayerEmailBuilder.tsx ← drag-and-drop header/footer editor
  emails/templates/
    ResultsEmail.tsx ← React Email template (rendered server-side)

Data Flow Diagram

CustomResultsEmails Editor UI
→ PATCH →
Event Document Firestore
↓ (event processed)
AddBoutToRecord Reads event settings
→ POST →
/api/emails/resultEmail Route handler
ResultsEmail.tsx React Email render()
→ HTML →
Resend API emails.send()
/api/emails/webhooks Tracks: delivered, opened, clicked, bounced, spam, unsubscribed

Dual Send Path

The API intelligently routes to the right email provider.

Primary

Resend (React Email)

Used when useReactEmail: true or custom HTML template exists on the event. Supports click/open tracking via webhooks. Full customization with themes, Unlayer content, and feature toggles.

Fallback

AWS SES (Default)

Used when no custom template is configured. Sends a hardcoded HTML template with sponsor sections and basic links. Includes plain-text fallback.

Media Upload Security

The "Submit Photos & Videos" button uses HMAC-based tokens for secure access.

Email Sent Generate HMAC token from fighter email + bout ID
Upload URL /events/.../boutId?upload=true&email=...&token=HMAC
Token Verified Only the email recipient can upload

Each fighter gets a unique, non-guessable upload link. No login required. Tokens are validated server-side before allowing uploads.

Key Metrics to Track

Use webhook data to measure and optimize your email performance.

Deliverability

Delivery & Bounce Rate

Track what % of emails reach fighters. High bounce rates indicate bad email data in fighter profiles. Act on bounces to clean your fighter database.

Engagement

Open & Click Rate

Measure how many fighters open the email and which buttons they click most. Optimize by promoting the most-clicked CTAs more prominently.

Conversion

Return Registration Rate

Fighters who click "Upcoming Events" or visit the event page are more likely to register again. Correlate email clicks with future registrations.

Health

Spam & Unsubscribe Rate

Keep these below 0.1% to maintain sender reputation. High complaint rates can get your domain blocked by email providers.