Ajout de la barre de navigation
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
SGL/sirh/pipeline/head This commit looks good

This commit is contained in:
2026-09-04 12:19:27 +00:00
parent 900343a4f8
commit 1a21998c39
19 changed files with 62 additions and 42 deletions

View File

@@ -1,3 +1,5 @@
from django.conf import settings
from django.core.mail import send_mail
from django.utils import timezone
from gestion_conge.models import Conge
@@ -46,3 +48,14 @@ def destinataire_mail_demande_conges(employe):
if employe.departement:
chefs_departement = Employe.objects.filter(departement=employe.departement, chef=True)
return list(chefs_departement.values_list('user__email', flat=True))
def envoyer_mail(sujet, message, destinataires):
"""Fonction d'envoi de mail"""
send_mail(
sujet,
message,
settings.EMAIL_HOST_USER,
destinataires,
fail_silently=False,
)