Commit d7ab37df authored by Michal Čihař's avatar Michal Čihař

Comments are sent with real sender (issue #160)

parent ad66f6ec
......@@ -46,7 +46,7 @@ import logging
logger = logging.getLogger('weblate')
def send_notification_email(language, email, notification, translation_obj, context={}, headers={}):
def send_notification_email(language, email, notification, translation_obj, context={}, headers={}, from_email=None):
'''
Renders and sends notification email.
'''
......@@ -90,8 +90,9 @@ def send_notification_email(language, email, notification, translation_obj, cont
email = EmailMessage(
settings.EMAIL_SUBJECT_PREFIX + subject.strip(),
body,
to = [email],
headers = headers
to=[email],
headers=headers,
from_email=from_email,
)
# Send it out
......
......@@ -1580,7 +1580,8 @@ def comment(request, pk):
'unit': obj,
'comment': new_comment,
'subproject': obj.translation.subproject,
}
},
from_email=request.user.email,
)
else:
messages.error(request, _('Failed to add comment!'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment