From 264eeabd701daa030c5627e705883263f5e02ad9 Mon Sep 17 00:00:00 2001
From: NguyenND
Date: Thu, 6 Aug 2026 12:24:08 -0400
Subject: [PATCH] Aug 6 - Update enrollment page, correct confirmation email
---
.claude/settings.json | 3 ++-
app/enrollment/mailer.py | 8 ++++----
app/enrollment/schema.py | 7 +++++++
.../templates/enrollment/email_confirmation.html | 4 +++-
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.claude/settings.json b/.claude/settings.json
index d28a2c0..ffad427 100644
--- a/.claude/settings.json
+++ b/.claude/settings.json
@@ -17,7 +17,8 @@
"Bash(python -c \"import ast,io; ast.parse\\(io.open\\('app/routes/dashboard.py',encoding='utf-8'\\).read\\(\\)\\); print\\('dashboard route OK'\\)\")",
"Bash(python -c ' *)",
"Bash(git diff *)",
- "Bash(python -c \"import ast;ast.parse\\(open\\('app/enrollment/routes.py',encoding='utf-8'\\).read\\(\\)\\);print\\('parses OK'\\)\")"
+ "Bash(python -c \"import ast;ast.parse\\(open\\('app/enrollment/routes.py',encoding='utf-8'\\).read\\(\\)\\);print\\('parses OK'\\)\")",
+ "Bash(python -c \"import ast;[ast.parse\\(open\\(f,encoding='utf-8'\\).read\\(\\)\\) for f in ['app/enrollment/mailer.py','app/enrollment/schema.py']];print\\('parses OK'\\)\")"
]
}
}
diff --git a/app/enrollment/mailer.py b/app/enrollment/mailer.py
index c15aa07..d4a3073 100644
--- a/app/enrollment/mailer.py
+++ b/app/enrollment/mailer.py
@@ -24,7 +24,7 @@ from flask import current_app, render_template
logger = logging.getLogger(__name__)
-def _text_body(record, people):
+def _text_body(record, people, corrections_email):
"""Plain-text alternative — some recipients see only this."""
lines = [
f'Hi {record.get("request_by") or "there"},',
@@ -45,8 +45,8 @@ def _text_body(record, people):
'Our team will create these accounts. Each person will receive their own '
'email invitation with sign-in instructions.',
'',
- 'If anything above is wrong, simply reply to this email and we will '
- 'correct it.',
+ f'If anything above is wrong, simply send an email to '
+ f'{corrections_email}, and we will correct it.',
'',
'JQC by L.T Services, Inc',
]
@@ -78,7 +78,7 @@ def send_confirmation(record, base_url=None):
subject = f'[JQC] Enrollment received — {record.get("project_name")}',
sender = branded_sender(effective_base),
recipients = [email],
- body = _text_body(record, people),
+ body = _text_body(record, people, schema.CORRECTIONS_EMAIL),
html = render_template('enrollment/email_confirmation.html',
record=record, people=people,
schema=schema),
diff --git a/app/enrollment/schema.py b/app/enrollment/schema.py
index bdb9259..e751f51 100644
--- a/app/enrollment/schema.py
+++ b/app/enrollment/schema.py
@@ -120,6 +120,13 @@ def recommendation_map():
return {role: recommendation_for(role) for role in ROLE_KEYS}
+#: Where a customer should write if their submission needs correcting. The
+#: confirmation email is sent FROM the unmonitored no-reply identity
+#: (branded_sender), so "reply to this email" would go nowhere — point them
+#: here instead. Used by both the text and HTML bodies of the confirmation.
+CORRECTIONS_EMAIL = 'da.nguyen8744@gmail.com'
+
+
NOTES = [
'Each user will receive instructions on how to sign up and install the app '
'on their smart device.',
diff --git a/app/enrollment/templates/enrollment/email_confirmation.html b/app/enrollment/templates/enrollment/email_confirmation.html
index 6401251..df3d20f 100644
--- a/app/enrollment/templates/enrollment/email_confirmation.html
+++ b/app/enrollment/templates/enrollment/email_confirmation.html
@@ -64,7 +64,9 @@
Each person will receive their own email invitation with sign-in
instructions, along with a quick guide to the web portal and the mobile app.
- If anything above is wrong, simply reply to this email and we will correct it.
+ If anything above is wrong, simply send an email to
+ {{ schema.CORRECTIONS_EMAIL }},
+ and we will correct it.