Skip to content
Snippets Groups Projects

WIP: minor: send mails with delayed-mail of sib-manager

Closed Jean-Baptiste Pasquier requested to merge delayed-mails into master
1 file
+ 5
6
Compare changes
  • Side-by-side
  • Inline
@@ -5,7 +5,7 @@ import requests
from django.conf import settings
from django.contrib.admin.models import LogEntry
from django.contrib.sessions.models import Session
from django.core.mail import send_mail
from post_office import mail
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
@@ -95,12 +95,11 @@ def send_email_on_notification(sender, instance, created, **kwargs):
'object': where
}
)
send_mail(
'Notification on ' + settings.JABBER_DEFAULT_HOST,
instance.summary,
mail.send(
instance.user.email,
settings.EMAIL_HOST_USER or "noreply@" + settings.JABBER_DEFAULT_HOST,
[instance.user.email],
fail_silently=True,
subject='Notification on ' + settings.JABBER_DEFAULT_HOST,
message=instance.summary,
html_message=html_message
)
except:
Loading