Skip to content

Conversation

issuedat
Copy link
Contributor

This PR adds support for sending the user an email notification when their email has been changed.

3 new environment variables are introduced:

  • GOTRUE_MAILER_SUBJECTS_EMAIL_CHANGED_NOTIFICATION: Email subject to use for password changed notification.
  • GOTRUE_MAILER_TEMPLATES_EMAIL_CHANGED_NOTIFICATION: The URL to specify a custom template.
  • GOTRUE_MAILER_NOTIFICATIONS_EMAIL_CHANGED_ENABLED: whether the notification is enabled or not.

The feature is disabled by default. To enable it, the GOTRUE_MAILER_NOTIFICATIONS_EMAIL_CHANGED_ENABLED environment variable must be set to true.

The default email will look as follows:

Screenshot 2025-09-26 at 15 28 18

@issuedat issuedat marked this pull request as ready for review September 26, 2025 13:55
@issuedat issuedat requested a review from a team as a code owner September 26, 2025 13:55
@coveralls
Copy link

Pull Request Test Coverage Report for Build 18039665289

Details

  • 74 of 93 (79.57%) changed or added relevant lines in 5 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.05%) to 67.686%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/verify.go 3 6 50.0%
internal/api/mail.go 60 66 90.91%
internal/mailer/templatemailer/templatemailer.go 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
internal/mailer/templatemailer/templatemailer.go 6 78.99%
Totals Coverage Status
Change from base Build 18014087012: 0.05%
Covered Lines: 13305
Relevant Lines: 19657

💛 - Coveralls

Copy link
Contributor

@cstockton cstockton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@issuedat issuedat merged commit 047f851 into master Sep 30, 2025
8 checks passed
@issuedat issuedat deleted the iat/email-changed-notification branch September 30, 2025 16:56
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.

3 participants