import os from dotenv import load_dotenv import httpx import asyncio load_dotenv() # Consistent URL usage for deployment BASE_URL = os.getenv("APP_URL", "https://legal-assistant-lawbot.hf.space") # Brevo (Sendinblue) Configuration BREVO_API_KEY = os.getenv("BREVO_API_KEY", "") # Must be your verified sender in Brevo BREVO_SENDER_EMAIL = os.getenv("BREVO_SENDER_EMAIL", "vishwaroman04@gmail.com") async def send_reset_email(email: str, token: str): """Send password reset email using Brevo (Sendinblue) API""" if not BREVO_API_KEY: raise ValueError("BREVO_API_KEY missing. Please add it to Secrets.") reset_link = f"{BASE_URL}/reset-password?token={token}" html_body = f"""
Hello,
We received a request to reset your password for your Law Bot account.
Click the button below to reset your password:
Reset PasswordOr copy and paste this link into your browser:
{reset_link}
If you didn't request this, you can safely ignore this email.
Law Bot India - AI Legal Assistant
https://legal-assistant-lawbot.hf.space