[feat] trees & [fix] deploy & [fix] some bugs

This commit is contained in:
Data-Name-ID
2024-04-02 11:58:55 +03:00
parent cb40fb71c8
commit dd563715f2
13 changed files with 113 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
def send_mails_for_commands(teams):
subject = "Ваша команда"
from_mail = settings.EMAIL_HOST_USER
template_name = "mail.html"
context = {}
for team in teams:
to_mails = [x["email"] for x in team]
context = {
"team": team,
}
html_content = render_to_string(template_name, context)
send_mail(
subject=subject,
from_email=from_mail,
recipient_list=to_mails,
message="Круто",
fail_silently=True,
html_message=html_content,
)