settings: Added setting to turn on and off realm name in email subject.

Users having only account in one realm will not be distracted by realm
name in subject lines of every email.  Users who have multiple
accounts in realms can turn this setting on and receive a
corresponding realm name in email's subject.

Tweaked by tabbott to rebase and address a few small issues.

Fixes #5489.
This commit is contained in:
Roman Godov
2018-01-07 01:30:43 +03:00
committed by Tim Abbott
parent ecbb763e79
commit b875fe07eb
11 changed files with 53 additions and 10 deletions

View File

@@ -41,7 +41,6 @@ def build_email(template_prefix: str, to_user_id: Optional[int]=None,
context = {}
context.update({
'realm_name_in_notifications': False,
'support_email': FromAddress.SUPPORT,
'email_images_base_uri': settings.ROOT_DOMAIN_URI + '/static/images/emails',
'physical_address': settings.PHYSICAL_ADDRESS,