Skip to main content

Outbound Email

Transactional emails for authentication, billing, and credit-related events.

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 TypeTriggerCooldown
WelcomeNew account registrationNone
Email VerificationAccount creation, email change5 minutes
Password ResetForgot password request5 minutes
Password ChangedSuccessful password changeNone

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 TypeTriggerCooldown
Payment SuccessTransaction completedNone
Payment FailedPayment attempt failed60 minutes
Subscription ActivatedNew subscription startsNone
Subscription UpgradedPlan upgradedNone
Subscription DowngradedPlan downgradedNone
Subscription CancelledSubscription cancelledNone
Subscription Past DuePayment overdue24 hours
Credits PurchasedOne-time purchaseNone

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 TypeTriggerCooldown
Credit LowBalance drops below 10%60 minutes
Credit DepletedBalance reaches 0120 minutes
Overage AlertUsage exceeds plan credits240 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 TypeCooldown
Welcome, Password ChangedNone
Password Reset, Email Verification5 minutes
Credit Low, Payment Failed60 minutes
Credit Depleted120 minutes
Overage Alert240 minutes
Subscription Past Due24 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

StatusDescription
pendingNotification queued for delivery
sentSuccessfully delivered
failedDelivery failed

Troubleshooting

Emails Not Sending

  1. Verify your account email is confirmed
  2. Check cooldown — you may be within a cooldown period
  3. Review notification history in the dashboard
  4. Contact support if issues persist

Emails Going to Spam

  1. Add [email protected] to your contacts
  2. Check your email provider's spam settings
  3. 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.