import resend import os from config import RESEND_API_KEY, EMAIL_FROM, FRONTEND_URL def send_verification_email(to_email: str, username: str, token: str): resend.api_key = RESEND_API_KEY verify_url = f"{FRONTEND_URL}/verify-email?token={token}" resend.Emails.send({ "from": EMAIL_FROM, "to": to_email, "subject": "Verify your WikiTCG email", "html": f"""

Welcome to WikiTCG

Hi {username},

Please verify your email address to complete your registration:

Verify Email

This link expires in 24 hours.

- WikiTCG

""", }) def send_password_reset_email(to_email: str, username: str, reset_token: str): resend.api_key = RESEND_API_KEY reset_url = f"{FRONTEND_URL}/forgot-password/reset?token={reset_token}" resend.Emails.send({ "from": EMAIL_FROM, "to": to_email, "subject": "Reset your WikiTCG password", "html": f"""

WikiTCG Password Reset

Hi {username},

Someone requested a password reset for your account. If this was you, click the link below:

Reset Password

This link expires in 1 hour. If you didn't request this, you can safely ignore this email.

- WikiTCG

""", })