Move 39 documentation files from top-level docs/ into each module's docs/ folder, accessible via symlinks from docs/modules/. Create data-model.md files for 10 modules with full schema documentation. Replace originals with redirect stubs. Remove empty guide stubs. Modules migrated: tenancy, billing, loyalty, marketplace, orders, messaging, cms, catalog, inventory, hosting, prospecting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.0 KiB
Email Settings Guide
This guide covers email configuration for both stores and platform administrators. The Orion platform uses a layered email system where stores manage their own email sending while the platform handles system-level communications.
Overview
The email system has two distinct configurations:
| Aspect | Platform (Admin) | Store |
|---|---|---|
| Purpose | System emails (billing, admin notifications) | Customer-facing emails (orders, marketing) |
| Configuration | Environment variables (.env) + Database overrides | Database (per-store) |
| Cost | Platform owner pays | Store pays |
| Providers | SMTP, SendGrid, Mailgun, SES | SMTP (all tiers), Premium providers (Business+) |
Store Email Settings
Getting Started
As a store, you need to configure email settings to send emails to your customers. This includes order confirmations, shipping updates, and marketing emails.
Accessing Email Settings
- Log in to your Store Dashboard
- Navigate to Settings from the sidebar
- Click on the Email tab
Available Providers
| Provider | Tier Required | Best For |
|---|---|---|
| SMTP | All tiers | Standard email servers, most common |
| SendGrid | Business+ | High-volume transactional emails |
| Mailgun | Business+ | Developer-friendly API |
| Amazon SES | Business+ | AWS ecosystem, cost-effective |
Configuring SMTP
SMTP is available for all subscription tiers. Common SMTP providers include:
- Gmail (smtp.gmail.com:587)
- Microsoft 365 (smtp.office365.com:587)
- Your hosting provider's SMTP server
Required Fields:
- From Email: The sender email address (e.g., orders@yourstore.com)
- From Name: The sender display name (e.g., "Your Store")
- SMTP Host: Your SMTP server address
- SMTP Port: Usually 587 (TLS) or 465 (SSL)
- SMTP Username: Your login username
- SMTP Password: Your login password
- Use TLS: Enable for port 587 (recommended)
- Use SSL: Enable for port 465
Configuring Premium Providers (Business+)
If you have a Business or Enterprise subscription, you can use premium email providers:
SendGrid
- Create a SendGrid account at sendgrid.com
- Generate an API key
- Enter the API key in your store settings
Mailgun
- Create a Mailgun account at mailgun.com
- Add and verify your domain
- Get your API key from the dashboard
- Enter the API key and domain in your settings
Amazon SES
- Set up SES in your AWS account
- Verify your sender domain/email
- Create IAM credentials with SES permissions
- Enter the access key, secret key, and region
Verifying Your Configuration
After configuring your email settings:
- Click Save Settings
- Enter a test email address in the Test Email field
- Click Send Test
- Check your inbox for the test email
If the test fails, check:
- Your credentials are correct
- Your IP/domain is not blocked
- For Gmail: Allow "less secure apps" or use an app password
Email Warning Banner
Until you configure and verify your email settings, you'll see a warning banner at the top of your dashboard. This ensures you don't forget to set up email before your store goes live.
Platform Admin Email Settings
Overview
Platform administrators can configure system-wide email settings for platform communications like:
- Subscription billing notifications
- Admin alerts
- Platform-wide announcements
Configuration Sources
Admin email settings support two configuration sources:
- Environment Variables (.env) - Default configuration
- Database Overrides - Override .env via the admin UI
Database settings take priority over .env values.
Accessing Admin Email Settings
- Log in to the Admin Panel
- Navigate to Settings
- Click on the Email tab
Viewing Current Configuration
The Email tab shows:
- Provider: Current email provider (SMTP, SendGrid, etc.)
- From Email: Sender email address
- From Name: Sender display name
- Status: Whether email is configured and enabled
- DB Overrides: Whether database overrides are active
Editing Settings
Click Edit Settings to modify the email configuration:
- Select the email provider
- Enter the required credentials
- Configure enabled/debug flags
- Click Save Email Settings
Resetting to .env Defaults
If you've made database overrides and want to revert to .env configuration:
- Click Reset to .env Defaults
- Confirm the action
This removes all email settings from the database, reverting to .env values.
Testing Configuration
- Enter a test email address
- Click Send Test
- Check your inbox
Environment Variables Reference
For platform configuration via .env:
# Provider: smtp, sendgrid, mailgun, ses
EMAIL_PROVIDER=smtp
# Sender identity
EMAIL_FROM_ADDRESS=noreply@yourplatform.com
EMAIL_FROM_NAME=Your Platform
EMAIL_REPLY_TO=support@yourplatform.com
# Behavior
EMAIL_ENABLED=true
EMAIL_DEBUG=false
# SMTP Configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-username
SMTP_PASSWORD=your-password
SMTP_USE_TLS=true
SMTP_USE_SSL=false
# SendGrid
SENDGRID_API_KEY=your-api-key
# Mailgun
MAILGUN_API_KEY=your-api-key
MAILGUN_DOMAIN=mg.yourdomain.com
# Amazon SES
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_REGION=eu-west-1
Tier-Based Branding
The email system includes tier-based branding for store emails:
| Tier | Branding |
|---|---|
| Essential | "Powered by Orion" footer |
| Professional | "Powered by Orion" footer |
| Business | No branding (white-label) |
| Enterprise | No branding (white-label) |
Business and Enterprise tier stores get completely white-labeled emails with no Orion branding.
Troubleshooting
Common Issues
"Email sending is disabled"
- Check that
EMAIL_ENABLED=truein .env - Or enable it in the admin settings
"Connection refused" on SMTP
- Verify SMTP host and port
- Check firewall rules
- Ensure TLS/SSL settings match your server
"Authentication failed"
- Double-check username/password
- For Gmail, use an App Password
- For Microsoft 365, check MFA requirements
"SendGrid error: 403"
- Verify your API key has Mail Send permissions
- Check sender identity is verified
Premium provider not available
- Upgrade to Business or Enterprise tier
- Contact support if you have the right tier but can't access
Debug Mode
Enable debug mode to log emails instead of sending them:
- Set
EMAIL_DEBUG=truein .env - Or enable "Debug mode" in admin settings
Debug mode logs the email content to the server logs without actually sending.
Security Best Practices
- Never share API keys or passwords in logs or frontend
- Use environment variables for sensitive credentials
- Enable TLS for SMTP connections
- Verify sender domains with your email provider
- Monitor email logs for delivery issues
- Rotate credentials periodically