generated from westfarn/web_django_template
Ship College Craft public site and point CI deploys at college_craft.
Replaces template branding with College Craft pages, assets, and copy, and matches Gitea deploy workflows to the server-infra catalog name and master branch so beta deploys actually run. Closes #1
This commit is contained in:
@@ -13,7 +13,7 @@ from public.email_branding import email_brand_context
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def notify_admins_of_contact_form(lead: Lead) -> bool:
|
||||
def notify_admins_of_contact_form(lead: Lead, *, subject_prefix: str | None = None) -> bool:
|
||||
"""
|
||||
Email CONTACT_EMAIL when someone submits the public contact form.
|
||||
|
||||
@@ -62,8 +62,9 @@ def notify_admins_of_contact_form(lead: Lead) -> bool:
|
||||
text_content = get_template("emails/contact_email.txt").render(ctx)
|
||||
html_content = get_template("emails/contact_email.html").render(ctx)
|
||||
|
||||
prefix = subject_prefix or "New contact form inquiry"
|
||||
mail = EmailMultiAlternatives(
|
||||
subject=f"New contact form inquiry from {name}",
|
||||
subject=f"{prefix} from {name}",
|
||||
body=text_content,
|
||||
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||
to=[to_email],
|
||||
|
||||
Reference in New Issue
Block a user