Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

corporate: Add billing support email constant.

Lauryn Menard8bce83709f76
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 7666d0d2398..52774317dea 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -86,6 +86,8 @@ log_to_file(logging.getLogger("stripe"), BILLING_LOG_PATH)
ParamT = ParamSpec("ParamT")
ReturnT = TypeVar("ReturnT")
+BILLING_SUPPORT_EMAIL = "[email protected]"
+
MIN_INVOICED_LICENSES = 30
MAX_INVOICED_LICENSES = 1000
DEFAULT_INVOICE_DAYS_UNTIL_DUE = 30
@@ -2464,7 +2466,7 @@ class BillingSession(ABC):
}
send_email(
"zerver/emails/sponsorship_request",
- to_emails=[FromAddress.SUPPORT],
+ to_emails=[BILLING_SUPPORT_EMAIL],
# Sent to the server's support team, so this email is not user-facing.
from_name="Zulip sponsorship request",
from_address=FromAddress.tokenized_no_reply_address(),
@@ -3235,7 +3237,7 @@ class RemoteRealmBillingSession(BillingSession):
send_email(
"zerver/emails/sponsorship_approved_community_plan",
to_emails=billing_emails,
- from_address="[email protected]",
+ from_address=BILLING_SUPPORT_EMAIL,
context={
"billing_entity": self.billing_entity_display_name,
"plans_link": "https://zulip.com/plans/#self-hosted",
@@ -3639,7 +3641,7 @@ class RemoteServerBillingSession(BillingSession):
send_email(
"zerver/emails/sponsorship_approved_community_plan",
to_emails=billing_emails,
- from_address="[email protected]",
+ from_address=BILLING_SUPPORT_EMAIL,
context={
"billing_entity": self.billing_entity_display_name,
"plans_link": "https://zulip.com/plans/#self-hosted",
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index d7568c6adef..a787bc14e67 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -1853,7 +1853,7 @@ class StripeTest(StripeTestCase):
for message in outbox:
self.assert_length(message.to, 1)
- self.assertEqual(message.to[0], "[email protected]")
+ self.assertEqual(message.to[0], "[email protected]")
self.assertEqual(message.subject, "Sponsorship request (Open-source project) for zulip")
self.assertEqual(message.reply_to, ["[email protected]"])
self.assertEqual(self.email_envelope_from(message), settings.NOREPLY_EMAIL_ADDRESS)
diff --git a/corporate/views/remote_billing_page.py b/corporate/views/remote_billing_page.py
index 78739ab3188..ef834220827 100644
--- a/corporate/views/remote_billing_page.py
+++ b/corporate/views/remote_billing_page.py
@@ -30,7 +30,11 @@ from corporate.lib.remote_billing_util import (
RemoteBillingUserDict,
get_remote_server_and_user_from_session,
)
-from corporate.lib.stripe import RemoteRealmBillingSession, RemoteServerBillingSession
+from corporate.lib.stripe import (
+ BILLING_SUPPORT_EMAIL,
+ RemoteRealmBillingSession,
+ RemoteServerBillingSession,
+)
from zerver.lib.exceptions import (
JsonableError,
MissingRemoteRealmError,
@@ -334,7 +338,7 @@ def remote_realm_billing_confirm_email(
"remote_realm_host": remote_realm.host,
"confirmation_url": url,
"billing_help_link": "https://zulip.com/help/self-hosted-billing",
- "billing_contact_email": "[email protected]",
+ "billing_contact_email": BILLING_SUPPORT_EMAIL,
"validity_in_hours": LOGIN_CONFIRMATION_EMAIL_DURATION_HOURS,
}
send_email(
@@ -551,7 +555,7 @@ def remote_billing_legacy_server_confirm_login(
"remote_server_hostname": remote_server.hostname,
"confirmation_url": url,
"billing_help_link": "https://zulip.com/help/self-hosted-billing",
- "billing_contact_email": "[email protected]",
+ "billing_contact_email": BILLING_SUPPORT_EMAIL,
"validity_in_hours": LOGIN_CONFIRMATION_EMAIL_DURATION_HOURS,
}
send_email(