πŸ“§ Email Settings

← Back to Manage

Brevo API Configuration

πŸ“‹ Setup Instructions

Setup with Brevo (Free - 300 emails/day)

  1. Go to brevo.com and create a free account (or log in)
  2. After login, click your name (top-right) β†’ SMTP & API
    Or go directly to: https://app.brevo.com/settings/keys/api
  3. Click the "API Keys" tab
  4. Click "Generate a new API key"
  5. Give it a name (e.g. "Badminton Tournament") and click Generate
  6. ⚠️ Copy the key immediately β€” it starts with xkeysib- and is only shown once!
  7. Paste it in the "Brevo API Key" field above

Verify Your Sender Email

  1. Go to https://app.brevo.com/senders/list
  2. Click "Add a sender"
  3. Enter your email and a name
  4. Click Save β€” Brevo will send a verification email
  5. Open your inbox, click the verification link
βœ… Why Brevo API? Render (and many cloud hosts) block SMTP ports. Brevo's API uses HTTPS (port 443) which is always allowed.

⏰ Auto-Reminder System

The system automatically sends emails based on tournament dates. Runs every 6 hours.

1. Registration Reminders (to players NOT yet registered)

When Who Subject
3 days before reg. deadline Eligible players who haven't registered πŸ“‹ Registration closing in 3 days
Last day (day of deadline) Eligible players who haven't registered ⚠️ Last day to register

Based on the "Reg. deadline" date set on the Add/Remove Tournaments page. Only sends to players matching tournament groups.

2. Admin Notification (registration closed)

When Who Subject
Day registration deadline is reached All admin emails 🏸 Registration closed: {tournament} + total count

3. Competition Reminders (to REGISTERED players)

When Who Subject
3 days before competition starts Players who are registered 🏸 {tournament} starts in 3 days!
Day of competition Players who are registered 🏸 {tournament} starts today!

4. Cancellation Deadline Reminder (to REGISTERED players)

When Who Subject
1 day before cancellation deadline Players who are registered ⚠️ Last day for changes / withdrawal

Informs players that after the cancellation deadline, the entry fee will be charged regardless of participation.

Safeguards

  • βœ… Won't double-send β€” tracks every sent email in the database
  • βœ… Players can opt out per tournament
  • βœ… Group-aware β€” only sends to players whose groups match the tournament
  • βœ… Skips already-registered players for registration reminders

πŸ§ͺ Test Auto-Reminders

Send all 3 reminder types to a test email to verify how they look. Sets a short timer, then the system sends the emails.

πŸ“Š Email Delivery Events

Events received from Brevo webhook (bounces, blocks, etc.)