Overview
Trix sends transactional emails for authentication, billing, and credit-related events.
Outbound emails are automatically triggered by system events and include:
- Authentication emails - Welcome, password reset, verification
- Billing emails - Payment confirmations, subscription updates
- Credit alerts - Low balance, depleted, overage warnings
Authentication Emails
| Email Type | Trigger | Cooldown |
|---|---|---|
| Welcome | New account registration | None |
| Email Verification | Account creation, email change | 5 minutes |
| Password Reset | Forgot password request | 5 minutes |
| Password Changed | Successful password change | None |
Password Reset Email Variables
Variables
{
"userName": "John Doe",
"resetToken": "abc123xyz",
"cliCommand": "trix auth reset-password --token=abc123xyz",
"expiresIn": "1 hour"
}Billing Lifecycle Emails
These emails are triggered by billing events:
| Email Type | Trigger | Cooldown |
|---|---|---|
| Payment Success | Transaction completed | None |
| Payment Failed | Payment attempt failed | 60 minutes |
| Subscription Activated | New subscription starts | None |
| Subscription Upgraded | Plan upgraded | None |
| Subscription Downgraded | Plan downgraded | None |
| Subscription Cancelled | Subscription cancelled | None |
| Subscription Past Due | Payment overdue | 24 hours |
| Credits Purchased | One-time purchase | None |
Payment Success Variables
Variables
{
"userName": "John Doe",
"amount": "$99.00",
"planName": "Pro",
"nextBillingDate": "February 15, 2024",
"transactionId": "txn_abc123"
}Payment Failed Variables
Variables
{
"userName": "John Doe",
"failureReason": "Card declined",
"retryDate": "January 18, 2024",
"updatePaymentUrl": "https://app.trixdb.com/billing",
"gracePeriodDays": "7"
}Credit Alert Emails
| Email Type | Trigger | Cooldown |
|---|---|---|
| Credit Low | Balance drops below 10% | 60 minutes |
| Credit Depleted | Balance reaches 0 | 120 minutes |
| Overage Alert | Usage exceeds plan credits | 240 minutes |
Credit Low Alert Variables
Variables
{
"accountName": "Acme Corp",
"creditsRemaining": "500",
"creditsTotal": "5000",
"percentageRemaining": "10",
"billingUrl": "https://app.trixdb.com/billing"
}Overage Alert Variables
Variables
{
"accountName": "Acme Corp",
"creditsUsed": "5500",
"creditsIncluded": "5000",
"overageAmount": "500",
"overageCost": "$25.00",
"billingUrl": "https://app.trixdb.com/billing"
}Cooldown System
To prevent notification spam, Trix implements cooldown periods:
| Notification Type | Cooldown |
|---|---|
| Welcome, Password Changed | None |
| Password Reset, Email Verification | 5 minutes |
| Credit Low, Payment Failed | 60 minutes |
| Credit Depleted | 120 minutes |
| Overage Alert | 240 minutes |
| Subscription Past Due | 24 hours |
When a notification is sent, the timestamp is recorded. Before sending the same notification type, the system checks if the cooldown period has elapsed.
Delivery
Outbound emails are queued for reliable, asynchronous delivery. Emails are prioritized based on type:
Priority Levels
- High - Security emails (password reset, verification)
- Normal - Standard notifications (billing, subscriptions)
- Low - Digests and summaries
Notification Status
| Status | Description |
|---|---|
pending | Notification queued for delivery |
sent | Successfully delivered |
failed | Delivery failed |
Troubleshooting
Emails Not Sending
- Verify your account email is confirmed
- Check cooldown — you may be within a cooldown period
- Review notification history in the dashboard
- Contact support if issues persist
Emails Going to Spam
- Add
[email protected]to your contacts - Check your email provider's spam settings
- Mark Trix emails as "not spam" if found in junk folder
Always verify webhook signatures to prevent spoofed requests and monitor your notification logs for delivery failures.