# Brevo

> Configure Brevo transactional email and optional marketing automation for a Supacharger project.

# Brevo

A Supacharger project can use Brevo for two separate purposes:

- **transactional email**, where Supabase Auth sends confirmations, OTPs, magic links, invitations, and password recovery through Brevo SMTP; and
- **marketing automation**, where the optional Supacharger Brevo plugin synchronizes contacts and subscribes users to newsletters or automation flows.

Keep transactional and marketing email configuration separate. Authentication messages must continue working even when a user has not consented to marketing email or has unsubscribed from a marketing list.

## Transactional email

Follow Brevo's current [Supabase SMTP configuration guide](https://help.brevo.com/hc/en-us/articles/7924908994450-Send-transactional-emails-using-Brevo-SMTP), then enter the credentials under **Supabase → Authentication → SMTP Settings**.

Complete the domain authentication, sender, deliverability, and Supabase rate-limit checks in [Auth email and SMTP](../Application%20Development/smtp.md).

### Disable authentication-link tracking

Do not allow Brevo to rewrite one-time Supabase Auth links. For transactional authentication email:

1. Open [**Settings → Automations → Transactional emails → Tracking**](https://app-smtp.brevo.com/advanced).
2. Disable click/link tracking for transactional messages.
3. Disable any automation or tracking option that rewrites links through a Brevo `/tr/cl/` URL.
4. Click **Save**.

Anonymous tracking is not sufficient: it can still rewrite the URL even though recipient details are anonymised. A Supabase confirmation, magic-link, recovery, invitation, or email-change credential must link directly to the configured application or Supabase endpoint.

After saving the setting, send fresh confirmation and recovery emails. Their links must not use a `sendibt3.com/tr/cl/` or other tracking redirect. Confirm that each direct one-time URL works exactly once and reaches the expected application handler.

## Marketing automation plugin

Marketing automation is an optional paid Supacharger module. Purchase and download it from [Brevo Marketing Email Automation](https://get.supacharger.dev/shop/source/plugins/brevo-marketing-email-automation/), then follow the versioned installation instructions included with the plugin.

### Automation flows

Create the intended automation in Brevo before connecting the application. Define its entry conditions, exit conditions, suppression behavior, and what happens after a contact unsubscribes.

Only enroll a user when the application has the required marketing consent. Authentication or account creation by itself is not universal permission to send marketing email.

### Newsletter signup

Create the newsletter list and campaign in Brevo, configure the plugin's required server environment variables, and enable the installed extension through the application's plugin registry:

```text
src/supacharger/plugins/registry.ts
```

Keep Brevo API keys server-only. Do not expose them through a `NEXT_PUBLIC_` environment variable.

### CRM contact synchronization

Decide which application fields are allowed to enter Brevo, how updates are reconciled, and how deletion or withdrawal of consent propagates. Avoid copying authorization roles, secrets, or unrelated profile data into marketing contact attributes.
