mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 05:48:11 -05:00
Add community_email method
This commit is contained in:
@@ -272,6 +272,7 @@ class Globals(object):
|
||||
'feedback_email',
|
||||
'share_reply',
|
||||
'nerds_email',
|
||||
'community_email',
|
||||
'smtp_server',
|
||||
],
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@ def _fraud_email(body, kind):
|
||||
Email.handler.add_to_queue(None, g.fraud_email, g.domain, g.fraud_email,
|
||||
kind, body=body)
|
||||
|
||||
def _community_email(body, kind):
|
||||
"""
|
||||
For sending email to the community mailbox
|
||||
"""
|
||||
Email.handler.add_to_queue(c.user, g.community_email, g.domain, g.community_email,
|
||||
kind, body=body)
|
||||
|
||||
def verify_email(user, dest=None):
|
||||
"""
|
||||
For verifying an email address
|
||||
@@ -119,6 +126,9 @@ def email_change_email(user):
|
||||
EmailChangeEmail(user=user).render(style='email'),
|
||||
Email.Kind.EMAIL_CHANGE)
|
||||
|
||||
def community_email(body, kind):
|
||||
return _community_email(body, kind)
|
||||
|
||||
|
||||
def nerds_email(body, from_name=g.domain):
|
||||
"""Queues a feedback email to the nerds running this site."""
|
||||
|
||||
@@ -308,6 +308,7 @@ class Email(object):
|
||||
"GOLD_GIFT_CODE",
|
||||
"SUSPICIOUS_PAYMENT",
|
||||
"FRAUD_ALERT",
|
||||
"USER_FRAUD",
|
||||
)
|
||||
|
||||
# Do not remove anything from this dictionary! See above comment.
|
||||
@@ -334,7 +335,8 @@ class Email(object):
|
||||
Kind.VOID_PAYMENT: _("[reddit] your payment has been voided"),
|
||||
Kind.GOLD_GIFT_CODE: _("[reddit] your reddit gold gift code"),
|
||||
Kind.SUSPICIOUS_PAYMENT: _("[selfserve] suspicious payment alert"),
|
||||
Kind.FRAUD_ALERT: _("[selfserve] fraud alert")
|
||||
Kind.FRAUD_ALERT: _("[selfserve] fraud alert"),
|
||||
Kind.USER_FRAUD: _("[selfserve] a user has committed fraud"),
|
||||
}
|
||||
|
||||
def __init__(self, user, thing, email, from_name, date, ip,
|
||||
|
||||
Reference in New Issue
Block a user