Skip to content

Commit

Permalink
Remove default reply-to header (#445)
Browse files Browse the repository at this point in the history
* feat: set reply-to to requester's email in bulk email

* fix: remove reply-to header from platform emails
  • Loading branch information
ahmed-arb authored Jul 10, 2024
1 parent 954165f commit 43c165a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions lms/djangoapps/bulk_email/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
'failed' count above.
"""
# Get information from current task's request:
parent_task_id = InstructorTask.objects.get(pk=entry_id).task_id
parent_task = InstructorTask.objects.select_related('requester').get(pk=entry_id)
parent_task_id = parent_task.task_id
task_id = subtask_status.task_id
total_recipients = len(to_list)
recipient_num = 0
Expand Down Expand Up @@ -568,8 +569,8 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
[email],
connection=connection
)
if hasattr(settings, 'DEFAULT_REPLY_TO_EMAIL'):
email_msg.reply_to = [settings.DEFAULT_REPLY_TO_EMAIL]
if parent_task.requester.email:
email_msg.reply_to = [parent_task.requester.email]
email_msg.attach_alternative(html_msg, 'text/html')

# Throttle if we have gotten the rate limiter. This is not very high-tech,
Expand Down
3 changes: 0 additions & 3 deletions openedx/core/djangoapps/ace_common/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ def __init__(self, *args, **kwargs):

if from_address:
self.options.update({'from_address': from_address}) # pylint: disable=no-member

if hasattr(settings, 'DEFAULT_REPLY_TO_EMAIL'):
self.options.update({'reply_to': [settings.DEFAULT_REPLY_TO_EMAIL]})

0 comments on commit 43c165a

Please sign in to comment.