Skip to content

fix(email): make notification subject lines more informative (#3532) - #3548

Merged
aicam merged 3 commits into
apache:masterfrom
DhritiSoni4:fix-email-subject-notification
Jul 9, 2025
Merged

aicam merged 3 commits into
apache:masterfrom
DhritiSoni4:fix-email-subject-notification

Conversation

@DhritiSoni4

Copy link
Copy Markdown
Contributor

Closes #3532 Make the subject of notification emails more informative
Related PR ##3393

Purpose

Improves email subject clarity by including the deployment domain (e.g., hub.texera.io) in user registration and role update notifications.

Implementation

Introduced a new deployment variable in EmailTemplate.scala:

  • Extracts the user-sys.domain from the config.
  • Removes http:// or https:// prefix using .replaceFirst("^https?://", "").

Updated 3 subject lines to incorporate $deployment:

  • Admin Notification Subject:
    New Account Request Pending Approval → New Account Request to $deployment Pending Approval
  • User Role Update Subject:
    Your Role Has Been Updated → Your Role Has Been Updated on $deployment
  • Email body update:
    Added $deployment in the body content for contextual clarity.

Testing

  • Verified manually by simulating Account request (admin and user) and role change event using SMTP.
  • Confirmed subject lines and body content are correctly updated with the domain hub.texera.io.

Untitled design

@aicam
aicam enabled auto-merge (squash) July 9, 2025 18:38
@aicam aicam changed the title fix(email): make notification subject lines more informative (#3532) fix(email): make notification subject lines more informative. (#3532) Jul 9, 2025
@DhritiSoni4
DhritiSoni4 requested a review from aicam July 9, 2025 20:46
@aicam aicam changed the title fix(email): make notification subject lines more informative. (#3532) fix(email): make notification subject lines more informative (#3532) Jul 9, 2025
@aicam
aicam merged commit 9407284 into apache:master Jul 9, 2025
aicam pushed a commit that referenced this pull request Sep 12, 2025
**Description:**
This PR fixes the previous implementation of enriching email subjects
#3548 that aims to add the domain name in email subjects.

**Problem:**
The previous implementation used `ConfigFactory.load()` which reads from
`application.conf` by default, but the `user-sys.domain` configuration
is defined in `user-system.conf`, causing the domain retrieval to always
fail and return empty strings.

Documentation:
https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html

**Solution:**
Replaced the incorrect domain retrieval with `UserSystemConfig` which
properly reads from `user-system.conf`.

Closes #3720 

**Email Subject Updates:**
```
"New Account Request Pending Approval" -> "New Account Request Pending Approval for [server-name]"
"Account Request Received"             -> "Account Request Received for [server-name]"
"Your Role Has Been Updated"           -> "Your Role Has Been Updated for [server-name]"
```

**Example:**
<img width="1484" height="710" alt="Screenshot 2025-09-11 at 2 16 26 PM"
src="https://github.com/user-attachments/assets/21f4d9cd-8642-407c-914d-51c91d6858bd"
/>

---------

Co-authored-by: Seongjin Yoon <[email protected]>
Co-authored-by: Seongjin Yoon <[email protected]>
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
…3532) (apache#3548)

Closes apache#3532 Make the subject of notification emails more informative
Related PR #apache#3393
### Purpose
Improves email subject clarity by including the deployment domain (e.g.,
hub.texera.io) in user registration and role update notifications.

### Implementation
Introduced a new deployment variable in EmailTemplate.scala:

- Extracts the user-sys.domain from the config.
- Removes http:// or https:// prefix using .replaceFirst("^https?://",
"").

Updated 3 subject lines to incorporate $deployment:

- Admin Notification Subject:
New Account Request Pending Approval → New Account Request to
$deployment Pending Approval
- User Role Update Subject:
Your Role Has Been Updated → Your Role Has Been Updated on $deployment
- Email body update:
         Added $deployment in the body content for contextual clarity.

### Testing

- Verified manually by simulating Account request (admin and user) and
role change event using SMTP.
- Confirmed subject lines and body content are correctly updated with
the domain hub.texera.io.











![Untitled
design](https://github.com/user-attachments/assets/abf5e433-44c4-4827-a23d-5891a2b89681)

---------

Signed-off-by: DhritiSoni4 <[email protected]>
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
**Description:**
This PR fixes the previous implementation of enriching email subjects
apache#3548 that aims to add the domain name in email subjects.

**Problem:**
The previous implementation used `ConfigFactory.load()` which reads from
`application.conf` by default, but the `user-sys.domain` configuration
is defined in `user-system.conf`, causing the domain retrieval to always
fail and return empty strings.

Documentation:
https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html

**Solution:**
Replaced the incorrect domain retrieval with `UserSystemConfig` which
properly reads from `user-system.conf`.

Closes apache#3720 

**Email Subject Updates:**
```
"New Account Request Pending Approval" -> "New Account Request Pending Approval for [server-name]"
"Account Request Received"             -> "Account Request Received for [server-name]"
"Your Role Has Been Updated"           -> "Your Role Has Been Updated for [server-name]"
```

**Example:**
<img width="1484" height="710" alt="Screenshot 2025-09-11 at 2 16 26 PM"
src="https://github.com/user-attachments/assets/21f4d9cd-8642-407c-914d-51c91d6858bd"
/>

---------

Co-authored-by: Seongjin Yoon <[email protected]>
Co-authored-by: Seongjin Yoon <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…3532) (apache#3548)

Closes apache#3532 Make the subject of notification emails more informative
Related PR #apache#3393
### Purpose
Improves email subject clarity by including the deployment domain (e.g.,
hub.texera.io) in user registration and role update notifications.

### Implementation
Introduced a new deployment variable in EmailTemplate.scala:

- Extracts the user-sys.domain from the config.
- Removes http:// or https:// prefix using .replaceFirst("^https?://",
"").

Updated 3 subject lines to incorporate $deployment:

- Admin Notification Subject:
New Account Request Pending Approval → New Account Request to
$deployment Pending Approval
- User Role Update Subject:
Your Role Has Been Updated → Your Role Has Been Updated on $deployment
- Email body update:
         Added $deployment in the body content for contextual clarity.

### Testing

- Verified manually by simulating Account request (admin and user) and
role change event using SMTP.
- Confirmed subject lines and body content are correctly updated with
the domain hub.texera.io.











![Untitled
design](https://github.com/user-attachments/assets/abf5e433-44c4-4827-a23d-5891a2b89681)

---------

Signed-off-by: DhritiSoni4 <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
**Description:**
This PR fixes the previous implementation of enriching email subjects
apache#3548 that aims to add the domain name in email subjects.

**Problem:**
The previous implementation used `ConfigFactory.load()` which reads from
`application.conf` by default, but the `user-sys.domain` configuration
is defined in `user-system.conf`, causing the domain retrieval to always
fail and return empty strings.

Documentation:
https://lightbend.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html

**Solution:**
Replaced the incorrect domain retrieval with `UserSystemConfig` which
properly reads from `user-system.conf`.

Closes apache#3720 

**Email Subject Updates:**
```
"New Account Request Pending Approval" -> "New Account Request Pending Approval for [server-name]"
"Account Request Received"             -> "Account Request Received for [server-name]"
"Your Role Has Been Updated"           -> "Your Role Has Been Updated for [server-name]"
```

**Example:**
<img width="1484" height="710" alt="Screenshot 2025-09-11 at 2 16 26 PM"
src="https://github.com/user-attachments/assets/21f4d9cd-8642-407c-914d-51c91d6858bd"
/>

---------

Co-authored-by: Seongjin Yoon <[email protected]>
Co-authored-by: Seongjin Yoon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the subject of notification emails more informative

2 participants