8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Envoit du mail avec l'adresse spécifiée dans les preferences

This commit is contained in:
Grizzly 2019-08-11 09:03:47 +00:00 committed by Gabriel Detraz
parent 295f7fa5fa
commit 81d2bf233a

View file

@ -5,6 +5,8 @@ from django.template import Context, loader
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.dispatch import receiver from django.dispatch import receiver
from preferences.models import GeneralOption
import users.models import users.models
class Ticket(models.Model): class Ticket(models.Model):
@ -54,7 +56,7 @@ class Ticket(models.Model):
send_mail( send_mail(
'Nouvelle ouverture de ticket', 'Nouvelle ouverture de ticket',
template.render(context), template.render(context),
'grisel-davy@crans.org', GeneralOption.get_cached_value('email_from'),
[to_addr], [to_addr],
fail_silently = False) fail_silently = False)