Skip to content

Commit

Permalink
Enable mozmail for Mozillians
Browse files Browse the repository at this point in the history
  • Loading branch information
say-yawn committed Aug 18, 2021
1 parent ee9a67c commit 8cd6652
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion emails/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ def _index_POST(request):
user=user_profile.user
)
try:
relay_address = RelayAddress.make_relay_address(locked_profile)
if user_profile.user.email.endswith('@mozilla.com'):
domain = get_domains_from_settings().get('MOZMAIL_DOMAIN')
relay_address = RelayAddress.make_relay_address(locked_profile, domain)
else:
relay_address = RelayAddress.make_relay_address(locked_profile)
except CannotMakeAddressException as e:
if settings.SITE_ORIGIN not in request.headers.get('Origin', ''):
# add-on request
Expand Down

0 comments on commit 8cd6652

Please sign in to comment.