language-learning-app/api/app/outbound/email/stub_client.py

16 lines
408 B
Python
Raw Permalink Normal View History

import logging
logger = logging.getLogger(__name__)
class StubEmailClient:
"""Logs emails instead of sending them. Use for local development."""
async def send_email(self, to: str, subject: str, html_body: str) -> None:
logger.info(
"STUB EMAIL — would have sent:\n To: %s\n Subject: %s\n Body:\n%s",
to,
subject,
html_body,
)