Skip to content

Commit 18d9a87

Browse files
committed
Improve password reset email formatting and info
Refactored PasswordResetEmailMessage to always show a clickable reset link and provide clearer instructions if the link does not work. IP address and browser details are now shown together if present, with improved formatting. Updated the Render method to set these parameters explicitly. Bumped project version to 2026.01.03.0043.
1 parent ddccfae commit 18d9a87

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

BLAZAM/BLAZAM.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<ServerGarbageCollection>false</ServerGarbageCollection>
88
<AssemblyVersion>1.5.0</AssemblyVersion>
9-
<Version>2026.01.02.1931</Version>
9+
<Version>2026.01.03.0043</Version>
1010
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
1111
<RootNamespace>BLAZAM</RootNamespace>
1212
<GenerateDocumentationFile>True</GenerateDocumentationFile>

BLAZAMEmailMessage/Email/Messages/PasswordResetEmailMessage.razor

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,7 @@
1414

1515

1616
</MudText>
17-
@if (!IpAddress.IsNullOrEmpty())
18-
{
19-
<MudText Align="Align.Center">Requested from: @IpAddress</MudText>
20-
}
21-
@if (!Browser.IsNullOrEmpty())
22-
{
23-
<MudText Align="Align.Center">Requested on: @Browser</MudText>
24-
}
17+
2518
<MudText Align="Align.Center"> <EmailLink Href="@ResetUri">Click here to reset your password</EmailLink></MudText>
2619

2720
}
@@ -34,8 +27,15 @@
3427

3528
}
3629
<MudDivider Class="my-6" />
37-
<MudText Align="Align.Center">If you did not request this reset, you can safely ignore it.</MudText>@*
38-
<MudText Align="Align.Center">If the link above does not work copy the following into the address bar. @ResetUri</MudText> *@
30+
<MudText Align="Align.Center">If you did not request this reset, you can safely ignore it.</MudText> <br />
31+
@if (!IpAddress.IsNullOrEmpty() || !Browser.IsNullOrEmpty())
32+
{
33+
<MudText Align="Align.Center">This request originated from : @IpAddress<br /> @Browser</MudText>
34+
35+
<br />
36+
}
37+
38+
<MudText Align="Align.Center">If the link above does not work copy the following into the address bar.<br /> @(DatabaseCache.ApplicationSettings.ForceHTTPS ? "https://" : "http://" + DatabaseCache.ApplicationSettings.AppFQDN + ResetUri)</MudText>
3939
</EmailTemplateBody>
4040

4141

@@ -54,6 +54,8 @@
5454
.UseLayout<DefaultEmailLayout>()
5555
.AddServiceProvider(ApplicationInfo.services)
5656
.Set(c => c.ResetUri, ResetUri)
57+
.Set(c => c.IpAddress, IpAddress)
58+
.Set(c => c.Browser, Browser)
5759
.Set(c => c.Expires, Expires).Render();
5860
}
5961

0 commit comments

Comments
 (0)