allow kwargs to be passed through to send_mail, and renamed arguments to match those of django's send_mail

pull/1981/merge
Matthew Downey 2015-12-01 10:25:59 +11:00 zatwierdzone przez Karl Hobley
rodzic 88341b782b
commit 7887360429
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -126,7 +126,7 @@ def any_permission_required(*perms):
return decorator
def send_mail(email_subject, email_content, email_addresses, from_email=None):
def send_mail(subject, message, recipient_list, from_email=None, **kwargs):
if not from_email:
if hasattr(settings, 'WAGTAILADMIN_NOTIFICATION_FROM_EMAIL'):
from_email = settings.WAGTAILADMIN_NOTIFICATION_FROM_EMAIL
@ -135,7 +135,7 @@ def send_mail(email_subject, email_content, email_addresses, from_email=None):
else:
from_email = 'webmaster@localhost'
django_send_mail(email_subject, email_content, from_email, email_addresses)
django_send_mail(subject, message, from_email, recipient_list, **kwargs)
def send_notification(page_revision_id, notification, excluded_user_id):