mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-20 21:08:43 +01:00
Issue #84: If an e-mail template doesn't exist, don't send the e-mail.
As requested (and patch provided by) flywheelnetworks.
This commit is contained in:
parent
4d264eaa28
commit
8d95221000
5
lib.py
5
lib.py
@ -67,7 +67,10 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if not t:
|
if not t:
|
||||||
t = EmailTemplate.objects.get(template_name__iexact=template_name)
|
try:
|
||||||
|
t = EmailTemplate.objects.get(template_name__iexact=template_name)
|
||||||
|
except EmailTemplate.DoesNotExist:
|
||||||
|
return # just ignore if template doesn't exist
|
||||||
|
|
||||||
if not sender:
|
if not sender:
|
||||||
sender = settings.DEFAULT_FROM_EMAIL
|
sender = settings.DEFAULT_FROM_EMAIL
|
||||||
|
Loading…
Reference in New Issue
Block a user