diff --git a/openedx/core/djangoapps/notifications/email/utils.py b/openedx/core/djangoapps/notifications/email/utils.py index 5fb07fc34817..3ce2306435f2 100644 --- a/openedx/core/djangoapps/notifications/email/utils.py +++ b/openedx/core/djangoapps/notifications/email/utils.py @@ -76,7 +76,10 @@ def get_unsubscribe_link(username, patch): 'patch': encrypted_patch } relative_url = reverse('preference_update_from_encrypted_username_view', kwargs=kwargs) - return f"{settings.LMS_BASE}{relative_url}" + protocol = 'https://' + if settings.DEBUG: + protocol = 'http://' + return f"{protocol}{settings.LMS_BASE}{relative_url}" def create_email_template_context(username):