Files
company_site/.env.example
T
westfarn 85369914c8
Unit Tests / test (push) Successful in 12s
Quote DEFAULT_FROM_EMAIL display name so contact mail sends (#29)
## Summary
- Closes #28
- Quote `DEFAULT_FROM_EMAIL` display name (`"AI ML Operations, LLC" <info@aimloperations.com>`) so RFC 5322 From parsing succeeds
- Update settings default, email send fallbacks, and `.env` examples

## Problem
Contact form saved leads but notification email to `ryan@aimloperations.com` failed with:
```
Invalid address; only AI ML Operations could be parsed from "AI ML Operations, LLC <info@aimloperations.com>"
```
Comma in unquoted display name treated as address-list separator.

## Test plan
- [ ] Submit contact form in an environment with SMTP configured
- [ ] Confirm lead appears on leads page
- [ ] Confirm email arrives at ryan@aimloperations.com
- [ ] If prod sets `DEFAULT_FROM_EMAIL` in `.env`, ensure that value is also quoted before deployReviewed-on: #29
2026-08-07 08:17:31 -07:00

50 lines
1.4 KiB
Bash

# Local development environment file (copy to .env).
# For production server values, use .env.prod.example instead.
DJANGO_ENV=dev
DJANGO_DEBUG=true
DJANGO_SECRET_KEY=change-me-for-local-development
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
# Optional; when unset, http:// origins are derived for local hosts.
# DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
# Database (docker-compose sets DATABASE_URL for the web service)
DATABASE_URL=postgres://company_site:company_site@db:5432/company_site
# DB_HOST=db
# DB_PORT=5432
# DB_NAME=company_site
# DB_USER=company_site
# DB_PASSWORD=company_site
# Logging
# DJANGO_LOG_LEVEL=DEBUG
# Analytics
TIANJI_ENABLED=false
TIANJI_TRACKER_URL=https://tianji.aimloperations.com/tracker.js
TIANJI_WEBSITE_ID=
# reCAPTCHA
RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=
# Email (SMTP2GO)
EMAIL_HOST=mail.smtp2go.com
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_PORT=2525
EMAIL_USE_TLS=true
# Display name has a comma — must be quoted (RFC 5322)
# DEFAULT_FROM_EMAIL="AI ML Operations, LLC" <info@aimloperations.com>
# Absolute origin for email logo / footer links
PUBLIC_SITE_URL=https://aimloperations.com
# Stripe (test keys from https://dashboard.stripe.com/test/apikeys)
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
# From `stripe listen` or Dashboard → Developers → Webhooks
STRIPE_WEBHOOK_SECRET=
# Gunicorn
GUNICORN_WORKERS=2
GUNICORN_BIND=0.0.0.0:8000