user_management/utils/notifications.py
def email_handler(notification, email_context):
    """Send a notification by email."""
    incuna_mail.send(
        to=notification.user.email,
        subject=notification.email_subject,
        template_name=notification.text_email_template,
        html_template_name=notification.html_email_template,
        context=email_context(notification),
        headers=getattr(notification, 'headers', {}),
    )
def email_handler(notification, email_context):
    """Send a notification by email."""
    incuna_mail.send(
        to=notification.user.email,
        subject=notification.email_subject,
        template_name=notification.text_email_template,
        html_template_name=notification.html_email_template,
        context=email_context(notification),
        headers=getattr(notification, 'headers', {}),
    )
Send a notification by email.