---check .env file fully---
# Copy this file to `.env` and fill in real values before running the app.
# NEVER commit a real `.env` file to version control.

# ---------------------------------------------------------------------------
# Application
# ---------------------------------------------------------------------------
APP_NAME=BulkGmailMailer
ENVIRONMENT=development
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(64))"
SECRET_KEY=2DxpkKregwhGCaESwnyxhFGW40luzd3RGzn8NmCqmXp0Db1Re4_b2PDRszWXWUKA
BASE_URL=https://ravanamailer.com
FRONTEND_BASE_URL=https://ravanamailer.com

# ---------------------------------------------------------------------------
# Database / Redis
# ---------------------------------------------------------------------------
DATABASE_URL=postgresql+psycopg://mailer:mailer_dev_pw@localhost:5432/bulkmailer
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_DB=1
CELERY_RESULT_DB=2

# ---------------------------------------------------------------------------
# Security
# ---------------------------------------------------------------------------
ACCESS_TOKEN_EXPIRE_MINUTES=720
SESSION_COOKIE_NAME=mailer_session
CSRF_COOKIE_NAME=mailer_csrf
# Fernet key (44-char urlsafe base64). Generate with:
#   python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
# Leave empty to auto-generate & persist to .encryption_key on first boot (dev only;
# ALWAYS set this explicitly in production so tokens survive redeploys).
ENCRYPTION_KEY=TA8yTngJFFe_wI2yW1eUk9Zzl6ObUQ8SPU6dJJdNqSg=
PASSWORD_MIN_LENGTH=10

# ---------------------------------------------------------------------------
# Rate limiting
# ---------------------------------------------------------------------------
RATE_LIMIT_PER_MINUTE=240

# ---------------------------------------------------------------------------
# Uploads
# ---------------------------------------------------------------------------
MAX_UPLOAD_MB=10
UPLOAD_DIR=uploads
ALLOWED_ATTACHMENT_EXTS=pdf,html,htm,txt,png,jpg,jpeg
ALLOWED_TEMPLATE_EXTS=html,htm,txt

# ---------------------------------------------------------------------------
# Recipients / campaign limits
# ---------------------------------------------------------------------------
MAX_RECIPIENTS_PER_CAMPAIGN=2000
MAX_GMAIL_ACCOUNTS_PER_CAMPAIGN=10
MAX_SUBJECTS=1000

# ---------------------------------------------------------------------------
# Sending defaults (admin-configurable at runtime via Settings page too)
# ---------------------------------------------------------------------------
DEFAULT_SEND_INTERVAL_SECONDS=1.0
DEFAULT_MAX_PER_ACCOUNT_PER_CAMPAIGN=200
DEFAULT_RETRIES=3
DEFAULT_RETRY_DELAY_SECONDS=60
MAX_ATTACHMENT_TOTAL_MB=25
MAX_ATTACHMENT_PER_FILE_MB=15.0

# ---------------------------------------------------------------------------
# Amount ranges (defaults; admin-configurable)
# ---------------------------------------------------------------------------
AMOUNT_MIN=300.0
AMOUNT_MAX=1500.0
SHIPPING_MIN=5.0
SHIPPING_MAX=50.0

# ---------------------------------------------------------------------------
# Invoice number format
# ---------------------------------------------------------------------------
INVOICE_NUMBER_FORMAT={prefix}{R4}-{R5}-{R6}-{seq4}
INVOICE_PREFIX=INV-

# ---------------------------------------------------------------------------
# Unsubscribe
# ---------------------------------------------------------------------------
UNSUBSCRIBE_BASE=

# ---------------------------------------------------------------------------
# Google Cloud OAuth (see README.md "Google Cloud OAuth setup" section)
# ---------------------------------------------------------------------------
# Optional: path to a downloaded Google OAuth client JSON to auto-import at
# startup. You can also import the JSON from the Gmail Accounts page in the UI.
GOOGLE_OAUTH_CLIENT_JSON_PATH=

# ---------------------------------------------------------------------------
# Real-Gmail integration test gate (tests/test_integration_real_gmail.py)
# Leave all four blank to keep those tests skipped (recommended for CI).
# Only fill these in a throwaway/test Gmail account you control, and only to
# run the opt-in integration test suite locally.
# ---------------------------------------------------------------------------
GMAIL_TEST_ACCOUNT_EMAIL=
GMAIL_TEST_ACCOUNT_REFRESH_TOKEN=
GMAIL_TEST_ACCOUNT_CLIENT_ID=
GMAIL_TEST_ACCOUNT_CLIENT_SECRET=
