# System Settings

## General Settings

Configure the fundamental settings for your MailTrixy instance at Admin Panel → Settings → General.

Setting | Description
--- | ---
Application name | Your brand name, displayed in the header, emails, and page titles.
Application URL | The full URL of your MailTrixy installation (e.g., `https://app.yourdomain.com`). Used for generating links in emails and webhooks.
Timezone | Default timezone for the application. Affects dashboard charts, scheduled tasks, and business hours.
Default language | The default UI language for new users. Users can change their own language in their profile.
Currency | The currency used for subscription pricing (USD, EUR, GBP, INR, etc.).
Registration | Enable or disable public user registration. When disabled, only admins can create user accounts.
Email verification | Require users to verify their email address before accessing the application.

## Branding and Theming

Customize the appearance of your MailTrixy instance to match your brand identity.

- Logo: Upload your company logo (displayed in the header and login page). Recommended size: 200x50px, PNG or SVG with transparent background.
- Favicon: Upload a favicon (16x16 or 32x32 PNG) for browser tabs.
- Primary color: Set the accent color used throughout the UI (buttons, links, active states). Enter a hex code.
- Dark mode: Enable a dark theme option that users can toggle in their preferences.
- Login page background: Upload a custom background image for the login and registration pages.
- Custom CSS: Add custom CSS rules to fine-tune the UI appearance without modifying source files.

## Email (SMTP) Configuration

MailTrixy uses SMTP to send system emails (welcome messages, password resets, subscription confirmations, notifications). This is separate from the user's connected email accounts.

1. Go to Admin Panel → Settings → Email.
2. Enter the SMTP details:
   - SMTP Host: e.g., `smtp.gmail.com`, `smtp.mailgun.org`, `email-smtp.us-east-1.amazonaws.com`
   - SMTP Port: 587 (TLS) or 465 (SSL)
   - Encryption: TLS (recommended) or SSL
   - Username: Your SMTP username or email address
   - Password: Your SMTP password or app-specific password
   - From Address: The email address shown as the sender (e.g., `noreply@yourdomain.com`)
   - From Name: The display name shown as the sender (e.g., "MailTrixy")
3. Click Save.

Popular SMTP providers: Mailgun, Amazon SES, SendGrid, Postmark, Gmail (with app password), Brevo (Sendinblue).

## SMTP Testing Tool

After configuring SMTP, use the built-in testing tool to verify it works.

1. Click Send Test Email on the Email settings page.
2. Enter a recipient email address (your own email).
3. Click Send.
4. Check your inbox for the test email.

If the test fails, the error message will indicate the cause:

- Connection refused: Check the SMTP host and port. Ensure your server's firewall allows outbound connections on the SMTP port.
- Authentication failed: Double-check your username and password. For Gmail, you must use an App Password (not your regular password) if 2FA is enabled.
- SSL/TLS error: Try switching between TLS (port 587) and SSL (port 465).
- Timeout: Your hosting provider may block SMTP ports. Contact them or use an API-based mail provider (Mailgun API, SES API).

## Maintenance Mode

Put your MailTrixy instance into maintenance mode during updates or server migrations.

- Go to Admin Panel → Settings → Maintenance.
- Toggle Maintenance Mode on.
- Optionally customize the maintenance message users will see.
- Optionally set a secret key that allows you to bypass maintenance mode by appending `?secret=yourkey` to the URL.

While in maintenance mode:

- All non-admin users see a "We'll be right back" page.
- Admins can still access the admin panel normally.
- Webhooks from external services (WhatsApp, Twilio, etc.) return a 503 response. Most providers will retry these automatically.
- AI reply processing is paused and queued for processing after maintenance ends.

## Frontend / Landing Page CMS

MailTrixy includes a built-in CMS for managing your public-facing landing page and marketing content.

- Hero section: Edit the headline, subheadline, and call-to-action button text and link.
- Feature blocks: Add, remove, or reorder feature highlight blocks with icons, titles, and descriptions.
- Pricing section: Automatically generated from your subscription plans. You can toggle visibility and customize the section title.
- Testimonials: Add customer quotes with names, titles, and photos.
- FAQ section: Add expandable FAQ items for the landing page.
- Footer: Edit footer links, social media URLs, and copyright text.
- Custom pages: Create additional pages (Terms of Service, Privacy Policy, About Us) with a rich text editor.
- SEO: Set meta titles, descriptions, and Open Graph images for each page.

All CMS changes are saved to the database and take effect immediately — no deployment or cache clearing required.

## AI Provider Management

The system-level AI provider settings allow the admin to control which AI providers are available to all users.

- Global API keys: In SaaS mode, you can configure AI provider API keys at the system level so that users do not need to bring their own keys. The cost is absorbed by the platform and managed through plan limits.
- User-provided keys: Alternatively, require each user to enter their own API keys. This shifts the AI cost to the user.
- Hybrid mode: Provide a default key with limited usage, and allow users to enter their own key for unlimited usage.
- Provider availability: Toggle which providers are offered to users. For example, you might only enable OpenAI and hide the others to simplify the user experience.
- Default model: Set the default AI model for new users (they can change it in their own settings if their plan allows).
- Global spending limits: Set a system-wide monthly AI spending cap to protect against runaway costs.

Configure at Admin Panel → Settings → AI Providers.