"""Transactional email via Resend (magic-link login). If RESEND_API_KEY is unset (e.g. local dev), the link is printed to the server log instead of sent, so the login flow is still testable without a real inbox. """ import httpx from .config import settings async def send_magic_link_email(email: str, link: str): if not settings.resend_api_key: print(f"✉️ [DEV magic link] {email} -> {link}") return html = f"""
Click the button below to sign in. This link expires in 15 minutes.
If you didn't request this, ignore this email.