MCPcopy
hub / github.com/learnhouse/learnhouse / _send_email_resend

Function _send_email_resend

apps/api/src/services/email/utils.py:227–239  ·  view source on GitHub ↗
(sender: str, to: str, subject: str, body: str, mailing)

Source from the content-addressed store, hash-verified

225
226
227def _send_email_resend(sender: str, to: str, subject: str, body: str, mailing):
228 from fastapi import HTTPException
229 resend.api_key = mailing.resend_api_key
230 try:
231 return resend.Emails.send({
232 "from": sender,
233 "to": [to],
234 "subject": subject,
235 "html": body,
236 })
237 except Exception as e:
238 logger.error("Resend email failed to %s: %s", to, e, exc_info=True)
239 raise HTTPException(status_code=503, detail="Email service temporarily unavailable")
240
241
242_SMTP_TIMEOUT = 15

Callers 1

send_emailFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected