## Email Settings

Alpha Insights can send automated email notifications with your store's profit and expense reports. Configure email recipients, frequency, and which metrics to include in your scheduled email reports.

### Accessing Email Settings

1. Go to Alpha Insights → Settings
2. Navigate to the Email settings page (via tab or link)
3. You'll see configuration for Appearance Settings and email reports

### Quick Overview

What you can do:

- Configure automated profit reports (daily, weekly, monthly)
- Set up expense reports for accounting
- Choose which metrics to include in each email
- Send to multiple recipients
- Preview and test emails before enabling

## Appearance Settings

Control the overall formatting and branding of your email notifications.

### Include Header and Footer

What it does: Adds Alpha Insights branded header and footer to your emails

Options:

- Header: Branded header at the top with Alpha Insights logo and styling
- Footer: Footer section with links and branding

When to disable:

- You're using an email template plugin that already adds headers/footers
- You have custom email HTML templates configured
- You prefer plain-text style emails without branding
- Headers/footers conflict with your email client's formatting

Recommendation: Keep both enabled for professional-looking emails with proper formatting

## Email #1 - Profit Report

Your primary performance email with revenue, profit, orders, and sales metrics. This is the most important report for tracking daily business performance.

### Recipients

#### Comma Separated List Of Recipients

What it is: Email addresses that will receive this report

Format: `email1@domain.com, email2@domain.com, email3@domain.com`

Examples:

- Single owner: `john@yourstore.com`
- Owner + manager: `owner@yourstore.com, manager@yourstore.com`
- Team distribution: `ceo@store.com, cfo@store.com, operations@store.com`

Placeholder: If left empty, the email will default to your WordPress admin email address

Tip: You can send profit reports to different people than expense reports - configure each report separately

### Frequency

#### How Often This Email Should Be Sent

Choose when you want to receive profit reports. You can enable multiple frequencies - the report will send at each enabled interval.

Available options:

- Daily: Every day with yesterday's performance data (sent ~8 AM)
- Weekly: Every Monday with last week's complete data
- Monthly: First of each month with previous month's comprehensive summary

Multiple selections: You can check multiple boxes to receive reports at different intervals

Common configurations:

- Daily only: Perfect for active monitoring - check yesterday's performance every morning
- Weekly only: Good for less frequent review cycles - review business once per week
- Daily + Monthly: Quick daily pulse checks with detailed monthly summaries
- All three enabled: Complete coverage at all intervals (daily, weekly, monthly)

Disable all: Uncheck all boxes to stop profit report emails

### What Would You Like To Include?

Customize which metrics appear in your profit report emails. Check or uncheck each metric based on what you want to see.

#### Available Metrics

Order Revenue

- Total revenue (sales) for the period
- Includes all order totals from paid orders
- Before any costs are deducted

Order Cost

- Total costs for the period
- Includes product COGS, shipping, payment fees, custom costs
- Shows what you spent to fulfill orders

Order Profit

- Net order profit (revenue minus order costs)
- This is your gross profit before operating expenses
- Does not include additional expenses from Expense Manager

Order Count

- Number of orders placed and paid
- Based on order statuses configured in General Settings

Average Order Value

- Average revenue per order
- Calculated as: Total Revenue ÷ Order Count
- Useful for tracking if customers are spending more/less per order

Average Profit Per Order

- Average profit per order
- Calculated as: Total Order Profit ÷ Order Count
- Shows profitability per transaction

Total Products Sold

- Quantity of products sold (sum of all line item quantities)
- Shows volume of items moved

Total Product Discounts

- Amount of discounts applied via coupons or sale prices
- Helps track promotional impact

Total Refunds

- Refund amounts processed during the period
- Includes full and partial refunds

Additional Expenses

- Operating expenses from Expense Manager for the period
- Includes all expense categories (advertising, software, etc.)
- Does not include order-level costs (already in Order Cost)

Net Profit

- Final profit after all expenses
- Calculated as: Order Profit - Additional Expenses
- This is your true bottom line

#### Selecting Metrics

Minimal configuration: Order Revenue, Order Profit, Order Count

Balanced configuration: Order Revenue, Order Profit, Order Count, Average Order Value, Net Profit

Comprehensive: Enable all metrics for complete visibility

Recommendation: Start with a balanced configuration - you can always add more metrics later

### Testing and Preview

#### Preview Email

What it does: Opens a preview of what the profit report email will look like

How to use:

1. Click Preview Email button
2. Opens in new browser tab
3. Shows actual email HTML with sample data
4. Check formatting, layout, and structure

Use for: Verifying email appearance before enabling scheduled reports

#### Send Test Email

What it does: Immediately sends a test profit report with your actual store data

How to use:

1. Configure recipients in the field above
2. Select which metrics to include
3. Click Send Test Email
4. Email sent immediately to all configured recipients
5. Check your inbox (and spam folder)

Testing workflow:

1. Enter your email address in recipients
2. Choose metrics you want
3. Click "Send Test Email"
4. Review the email you receive
5. Adjust configuration if needed
6. Click "Save Changes" when satisfied

Important: Test email uses your actual store data, not sample data

### Example Profit Report

Subject Line: Your Store Profit Report - [Date Range]

Email Content Example:

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Your Store Performance Report
    Last 7 Days: Oct 15-22, 2024
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    💰 Order Revenue: $12,450.00
    📦 Orders: 143 orders
    📊 Average Order Value: $87.06

    💵 Order Cost: $7,558.00
    ✅ Order Profit: $4,892.00 (39.3% margin)
    📈 Average Profit Per Order: $34.21

    📦 Products Sold: 287 units
    💸 Discounts Applied: $525.00
    ↩️ Refunds: $450.00

    🏢 Additional Expenses: $645.00
    🎯 Net Profit: $4,247.00

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

## Email #2 - Expense Report

Track and review your business expenses automatically. Perfect for accounting, bookkeeping, and expense monitoring.

### Recipients

Same format as Profit Report - comma-separated email addresses

Different recipients: You can send expense reports to different people than profit reports

Common setup:

- Profit reports → Owner, managers
- Expense reports → Accountant, bookkeeper, CFO

### Frequency

Choose when to receive expense reports:

- Daily: Yesterday's expenses
- Weekly: Last week's expenses
- Monthly: Previous month's complete expense summary (most common)

Typical usage: Monthly expense reports are most popular for accounting and bookkeeping purposes

### What Would You Like To Include?

Customize which expense metrics appear in your reports.

#### Available Metrics

Total Expenses Paid

- Total amount of all expenses for the period
- Sum of all expense records in Expense Manager
- Primary metric for expense tracking

Total No. Expenses

- Count of individual expense entries
- Shows how many expenses were recorded
- Useful for tracking expense frequency

Average Expenses Per Day

- Daily average spending rate
- Calculated as: Total Expenses ÷ Days in Period
- Helps understand daily burn rate

All Parent Category Expenses

- Breakdown by top-level expense categories
- Shows spending across main categories (e.g., Marketing, Software, Shipping)
- High-level expense distribution

All Child Category Expenses

- Detailed breakdown including sub-categories
- Shows spending in granular detail (e.g., Facebook Ads, Google Ads under Marketing)
- Comprehensive category breakdown

#### Understanding Category Levels

Parent categories: Top-level groupings

- Marketing
- Software & Tools
- Shipping & Fulfillment
- Office Expenses

Child categories: Sub-categories under parents

- Marketing → Facebook Ads
- Marketing → Google Ads
- Marketing → Influencer Marketing
- Software & Tools → Email Marketing
- Software & Tools → Accounting Software

Tip: Enable "Parent Category Expenses" for clean overview, or "Child Category Expenses" for detailed analysis

### Example Expense Report

Subject Line: Your Store Expense Report - [Date Range]

Email Content Example:

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Expense Report
    October 2024
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    💰 Total Expenses: $3,245.00
    📋 Number of Expenses: 47
    📊 Average Per Day: $103.71

    Expense Breakdown by Category:
    📢 Advertising: $1,850.00 (57%)
      - Facebook Ads: $1,200.00
      - Google Ads: $650.00

    📦 Shipping & Fulfillment: $750.00 (23%)
      - Carrier Fees: $600.00
      - Packaging: $150.00

    💻 Software & Tools: $345.00 (11%)
      - Email Marketing: $199.00
      - Analytics Tools: $146.00

    🏢 Office Supplies: $200.00 (6%)

    🔧 Other: $100.00 (3%)

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

### Testing Expense Reports

Same testing options as Profit Reports:

- Preview Email: See what it looks like
- Send Test Email: Send with actual expense data

## Email Delivery

### When Emails Are Sent

Daily emails: Approximately 8:00 AM in your WordPress timezone

Weekly emails: Monday morning (8:00 AM)

Monthly emails: 1st of each month (8:00 AM)

Timezone: Based on your WordPress timezone setting (Settings → General → Timezone)

Important note: Email timing depends on WordPress cron, which requires site traffic to trigger. For guaranteed timing on low-traffic sites, consider setting up a server cron job.

### Email Deliverability

#### Default WordPress Email

By default, Alpha Insights uses WordPress's built-in email system (PHP mail function). This works but has limitations:

- Higher chance of emails going to spam
- Less reliable delivery
- No delivery tracking
- Not authenticated

#### Recommended: Use SMTP

For much better email delivery, install an SMTP plugin:

Popular SMTP plugins:

- WP Mail SMTP: Most popular, easy setup
- Post SMTP: Feature-rich alternative
- Easy WP SMTP: Simplified configuration

Recommended SMTP services:

- SendGrid: Free tier (100 emails/day), reliable, easy setup
- Mailgun: Developer-friendly, good pricing
- Amazon SES: Very cost-effective for volume
- Gmail: Easy but limited (500 emails/day)

Benefits of SMTP:

- ✅ Much better deliverability
- ✅ Emails rarely go to spam
- ✅ Authenticated sending
- ✅ Delivery tracking and logs
- ✅ Professional appearance

### Sender Configuration

Sender email address: Controlled by WordPress → Settings → General → Email Address

Sender name: Set by your SMTP plugin or theme

Best practices:

- Use an email from your domain: `reports@yourstore.com`
- Don't use personal email: `yourname@gmail.com`
- Use recognizable name: "YourStore Reports" not "WordPress"
- Configure SPF and DKIM records for your domain

## Saving Your Settings

After configuring email settings:

1. Click Save Changes button (top or bottom of page)
2. Wait for confirmation message
3. Send test emails to verify configuration
4. Check your inbox and spam folder

Settings take effect immediately - next scheduled email will use your new configuration

## Troubleshooting

### Not Receiving Emails

Check these items:

1. Spam folder: Check junk/spam - whitelist the sender
2. Email address: Verify correct address in settings (no typos)
3. Frequency enabled: At least one frequency box must be checked
4. WordPress cron: Verify scheduled tasks are running (WP Crontrol plugin)
5. Host allows email: Some hosts block outbound email - check with hosting support
6. SMTP configured: If using SMTP, verify settings are correct

Testing steps:

1. Click "Send Test Email"
2. If test arrives → scheduled emails should work (check spam folder for schedule)
3. If test doesn't arrive → email sending is broken (check SMTP, host settings)

### Emails Going to Spam

Common causes:

- Using PHP mail() instead of SMTP
- Sender email not from your domain
- Missing SPF/DKIM records
- Poor IP reputation

Solutions:

1. Install and configure SMTP plugin
2. Use sender email from your domain
3. Set up SPF record: Contact your DNS provider
4. Set up DKIM: Configured in SMTP service
5. Whitelist sender in your email client

### Wrong Data in Emails

Check:

- WordPress timezone matches your location
- Order statuses configured correctly in General Settings
- Reports cache is up to date (clear if needed)
- Metrics selected match what you want to see

### Emails Not Sending at Right Time

WordPress cron dependency: WordPress cron requires site traffic to run

Solutions:

- Install "WP Cron Control" plugin for reliable scheduling
- Set up server cron job (advanced - ask host)
- Verify WordPress timezone setting

## Best Practices

### Email Configuration

- Start simple: Enable just daily profit report initially
- Test thoroughly: Send test emails before enabling scheduled reports
- Right frequency: Don't overwhelm yourself - choose what you'll actually review
- Appropriate recipients: Send profit to management, expenses to accounting
- Focused metrics: Include only metrics you check regularly

### For Different Business Types

Solo business owner:

- Daily profit report to yourself
- Monthly expense report for tax preparation
- Include all metrics - you want full visibility

Small team (2-5 people):

- Daily profit to owner/manager
- Weekly profit to team
- Monthly expense to accountant
- Balanced metrics for each

Larger business:

- Daily profit to operations team
- Weekly profit to executives
- Monthly comprehensive reports to finance
- Custom recipient groups per report

### Privacy and Security

- Email is not encrypted - financial data is visible
- Only send to secure business email addresses
- Don't send to personal email accounts
- Regularly review recipient lists
- Remove recipients who no longer need access
- Be aware of compliance requirements for financial data

## Summary

Email settings in Alpha Insights provide:

- Automated reporting: Scheduled profit and expense summaries
- Customization: Choose metrics and frequency
- Flexibility: Different reports to different people
- Convenience: Performance data delivered to your inbox
- Reliability: Set it up once and it runs automatically

Configure your email reports to match your business review schedule, and you'll always stay informed about your store's profitability!