You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
flyapps/fir_ser/common/notify/utils.py

19 lines
534 B

#!/usr/bin/env python
# -*- coding:utf-8 -*-
# project: fir_ser
# filename: wx
# author: liuyu
# date: 2022/3/23
import logging
from api.utils.modelutils import get_notify_email_queryset
from common.utils.sendmsg import get_sender_email_token
logger = logging.getLogger(__name__)
def notify_by_email(user_obj, message_type, html):
for notify_email in get_notify_email_queryset(user_obj, message_type):
email = notify_email.get('email')
if email:
get_sender_email_token('email', email, 'msg', html)