options init
This commit is contained in:
SDE
2023-11-29 20:18:22 +03:00
parent f7e032a5bc
commit 2b6bbba265
9 changed files with 151 additions and 316 deletions

View File

@@ -241,49 +241,7 @@ def sendMail(subject, text_content, from_email, to, html_content):
return u'Accept'
# def techSendMail_for_top_management(html_content, title=None):
# try:
#
# # if not prod_server:
# # msg = '{0}. Not sended because is local'.format(html_content)
# # print(msg)
# # return msg
# from AuthApp.models import User
# from django.db.models import Q
#
# # to = ['web@syncsystems.net']
# to = User.objects.filter(
# Q(is_superuser=True) | Q(groups__name__in=[
# 'Отдел продаж: Начальник отдела продаж', 'Управляющий',
# 'Бухгалтерия: Главный бухгалтер'
# ]),
# is_active=True,
# is_staff=True
# ).values_list('email', flat=True)
# to = list(to)
# to.append('office@truenergy.by')
#
# print('techSendMail_for_top_management')
# if title:
# subject = title
# else:
# subject = u'truEnergy Data техническое оповещение'
# from_email = 'support@truenergy.by'
#
# res = admin_send_mail_by_SMTPlib(subject, from_email, to, html_content)
#
# # msg = EmailMultiAlternatives(subject, text_content, from_email, to)
# # msg.attach_alternative(html_content, "text/html")
# # msg.send()
# print(res)
# return u'Accept'
#
# except Exception as e:
# msg = 'techSendMail_for_top_management error={0}'.format(str(e))
# techSendMail(msg)
# print(msg)
#
# return 'Fail'
def techSendMail_for_specified_email_list(html_content, email_list, title=None):