Files
AI_CPA/services/api/app/utils/login_email.py
T
Atharv1705 683e29e0d1 fix: update domain to aiindiacpa.duckdns.org
- nginx/default.conf: server_name aiindiacpa.duckdns.org + VPS IP (no trailing slash)
- main.py: CORS default fallback updated to new domain
- review.py: DASHBOARD_LINK reads from FRONTEND_URL env var (no hardcoded domain)
- login_email.py: login/signup email links read from FRONTEND_URL env var
- ALLOWED_ORIGINS in .env: https://aiindiacpa.duckdns.org + http://147.93.168.145
  (IP on port 80 via nginx, not 8000 direct FastAPI)
2026-08-10 11:38:24 +05:30

48 lines
1.1 KiB
Python

import os
from app.utils.emailer import send_email
_FRONTEND_URL = os.getenv("FRONTEND_URL", "https://aiindiacpa.duckdns.org")
async def send_signup_welcome_email(to: str, name: str | None = None):
display_name = name or "Valued Customer"
body = f"""
<p>Dear {display_name},</p>
<p>
Welcome to <strong>BookKeepro</strong> 🎉
</p>
<p>
Your account has been successfully created.
We're excited to support you with your compliance and bookkeeping needs.
</p>
<p>
You can log in to your dashboard using the link below:
</p>
<p>
<a href="{_FRONTEND_URL}/login"
style="color:#0077c8;font-weight:600;text-decoration:none;">
👉 Login to BookKeepro
</a>
</p>
<p style="margin-top:20px;">
If you did not create this account, please contact our support team immediately.
</p>
<p style="margin-top:20px;">
Kind regards,<br>
<strong>BookKeepro Team</strong>
</p>
"""
await send_email(
to=to,
subject="Welcome to BookKeepro 🎉",
body=body
)