Skip to main content

send_email

Sends an email to a specified recipient using SMTP configuration settings and logs the transmission result. This function requires email functionality to be enabled in the application settings and depends on the emails library for message construction and delivery.

def send_email(
email_to: str,
subject: str,
html_content: str
) - > None

Sends an email message using the configured SMTP server settings. This function constructs a message with the provided subject and HTML content, then dispatches it to the specified recipient address.

Parameters

NameTypeDescription
email_tostrThe recipient's email address where the message will be delivered.
subjectstrThe subject line of the email; defaults to an empty string.
html_contentstrThe HTML-formatted body content of the email message.

Returns

TypeDescription
NoneNothing is returned; the result of the transmission is logged to the system logger.