You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
844 B

from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.utils.translation import ugettext_lazy as _
class RequestNotifiable(object):
MAIL_CATEGORY = 'Request'
SLUG_NOTIFICATION = 'notification'
SLUG_RESPONSE = 'response'
def __init__(self, *args, **kwargs):
super(RequestNotifiable, self).__init__(*args, **kwargs)
def get_mail_template(self, **kwargs):
return None
# return MailTemplate.objects.filter(**kwargs).first()
def send_request_notification(self, context):
"""
:param context
:param template_path string:
:return None:
"""
email = EmailMultiAlternatives(
context['subject'],'body',context['from_email'],
context['recipients'],context['bcc']
)