Email Utilities¶
Overview¶
core/email.py contains reusable email helper functions shared across all blueprints. Sends mail
asynchronously via a background thread so the request is not blocked.
Functions¶
send_email¶
send_email(subject, sender, recipients, text_body, html_body)
Builds a Message and dispatches it in a background thread.
Parameter |
Description |
|---|---|
|
Email subject line. |
|
Sender address string. |
|
List of recipient address strings. |
|
Plain-text email body. |
|
HTML email body. |
send_async_email¶
send_async_email(app, msg)
Internal helper. Pushes an application context and calls mail.send(msg).
Called only by send_email() via threading.Thread — do not
call directly.