settings: Extract settings.WELCOME_EMAIL_SENDER.

This commit is contained in:
Tim Abbott
2016-07-18 22:37:53 -07:00
parent 7725c62892
commit e876f12b83
3 changed files with 5 additions and 2 deletions

View File

@@ -460,8 +460,9 @@ def send_local_email_template_with_delay(recipients, template_prefix,
def enqueue_welcome_emails(email, name): def enqueue_welcome_emails(email, name):
# type: (text_type, text_type) -> None # type: (text_type, text_type) -> None
sender = {'email': 'wdaher@zulip.com', 'name': 'Waseem Daher'} # type: Dict[str, text_type] if settings.WELCOME_EMAIL_SENDER is not None:
if settings.VOYAGER: sender = settings.WELCOME_EMAIL_SENDER # type: Dict[str, text_type]
else:
sender = {'email': settings.ZULIP_ADMINISTRATOR, 'name': 'Zulip'} sender = {'email': settings.ZULIP_ADMINISTRATOR, 'name': 'Zulip'}
user_profile = get_user_profile_by_email(email) user_profile = get_user_profile_by_email(email)

View File

@@ -50,6 +50,7 @@ EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "Zulip <zulip@zulip.com>" DEFAULT_FROM_EMAIL = "Zulip <zulip@zulip.com>"
# The noreply address to be used as Reply-To for certain generated emails. # The noreply address to be used as Reply-To for certain generated emails.
NOREPLY_EMAIL_ADDRESS = "noreply@zulip.com" NOREPLY_EMAIL_ADDRESS = "noreply@zulip.com"
WELCOME_EMAIL_SENDER = {'email': 'wdaher@zulip.com', 'name': 'Waseem Daher'}
SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer" SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer"

View File

@@ -141,6 +141,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
'CAMO_URI': '', 'CAMO_URI': '',
'ENABLE_FEEDBACK': PRODUCTION, 'ENABLE_FEEDBACK': PRODUCTION,
'FEEDBACK_EMAIL': None, 'FEEDBACK_EMAIL': None,
'WELCOME_EMAIL_SENDER': None,
'ENABLE_GRAVATAR': True, 'ENABLE_GRAVATAR': True,
'DEFAULT_AVATAR_URI': '/static/images/default-avatar.png', 'DEFAULT_AVATAR_URI': '/static/images/default-avatar.png',
'AUTH_LDAP_SERVER_URI': "", 'AUTH_LDAP_SERVER_URI': "",