diff --git a/src/Backend/AutopilotMonitor.Functions.Tests/EmailServiceTests.cs b/src/Backend/AutopilotMonitor.Functions.Tests/EmailServiceTests.cs
index a4ca89a2..ae4b9d57 100644
--- a/src/Backend/AutopilotMonitor.Functions.Tests/EmailServiceTests.cs
+++ b/src/Backend/AutopilotMonitor.Functions.Tests/EmailServiceTests.cs
@@ -111,7 +111,7 @@ public sealed class EmailServiceTests
Assert.Equal(EmailService.DefaultFromName, message.GetProperty("from_name").GetString());
Assert.Equal("it@contoso.invalid", message.GetProperty("to")[0].GetProperty("email").GetString());
Assert.Equal("to", message.GetProperty("to")[0].GetProperty("type").GetString());
- Assert.Equal(EmailTemplates.PreviewApprovedSubject, message.GetProperty("subject").GetString());
+ Assert.Equal("Your Autopilot Monitor access for contoso.invalid is ready", message.GetProperty("subject").GetString());
Assert.Contains("contoso.invalid", message.GetProperty("html").GetString());
// A text part of our own (HtmlToText) instead of the provider's derived one, and the
// RFC 3834 header on every automated mail.
@@ -258,7 +258,8 @@ public sealed class EmailServiceTests
// The mail is sent from a noreply address after portal access is gone, so the
// feedback pointers must be external channels the recipient can actually reach.
Assert.Contains("https://github.com/okieselbach/AutopilotMonitor/issues", html);
- Assert.Contains("linkedin.com", html);
+ Assert.Contains("github.com/okieselbach/AutopilotMonitor/issues", html);
+ Assert.DoesNotContain("linkedin.com", html); // one feedback link only (user go 2026-10-08)
}
[Fact]
diff --git a/src/Backend/AutopilotMonitor.Functions/Services/EmailService.cs b/src/Backend/AutopilotMonitor.Functions/Services/EmailService.cs
index 223a9b6d..bf4ca957 100644
--- a/src/Backend/AutopilotMonitor.Functions/Services/EmailService.cs
+++ b/src/Backend/AutopilotMonitor.Functions/Services/EmailService.cs
@@ -96,7 +96,7 @@ public class EmailService : IEmailService, IOffboardFarewellEmailSender
}
var html = await _templates.GetHtmlAsync(EmailTemplateKind.Welcome, domainName, ct);
- var sent = (await SendViaMandrillAsync(toEmail, EmailTemplates.PreviewApprovedSubject, html, "welcome", ct,
+ var sent = (await SendViaMandrillAsync(toEmail, EmailTemplates.PreviewApprovedSubjectFor(domainName), html, "welcome", ct,
HtmlToText.Convert(html), AutomatedHeaders)).Accepted;
if (sent)
@@ -163,7 +163,7 @@ public class EmailService : IEmailService, IOffboardFarewellEmailSender
? await _templates.GetHtmlAsync(kind, domainName, ct)
: EmailTemplateService.Render(draftHtml, domainName);
- var sent = (await SendViaMandrillAsync(toEmail, EmailTemplateService.Subject(kind), html, "test", ct,
+ var sent = (await SendViaMandrillAsync(toEmail, EmailTemplateService.Subject(kind, domainName), html, "test", ct,
HtmlToText.Convert(html), AutomatedHeaders)).Accepted;
if (sent)
_logger.LogInformation("{Kind} test email sent to {ToEmail} (draft={IsDraft})", kind, toEmail, draftHtml is not null);
diff --git a/src/Backend/AutopilotMonitor.Functions/Services/EmailTemplateService.cs b/src/Backend/AutopilotMonitor.Functions/Services/EmailTemplateService.cs
index fe90c330..18658439 100644
--- a/src/Backend/AutopilotMonitor.Functions/Services/EmailTemplateService.cs
+++ b/src/Backend/AutopilotMonitor.Functions/Services/EmailTemplateService.cs
@@ -65,8 +65,12 @@ public class EmailTemplateService : IEmailTemplateProvider
public static string KindKey(EmailTemplateKind kind) => kind == EmailTemplateKind.Welcome ? "welcome" : "farewell";
- public static string Subject(EmailTemplateKind kind) => kind == EmailTemplateKind.Welcome
- ? EmailTemplates.PreviewApprovedSubject
+ ///
@@ -100,7 +108,7 @@ public static class EmailTemplates
This is the last email you'll receive from us. This mailbox doesn't accept - replies – please use the links above if you'd like to get in touch. + replies – please use the link above if you'd like to get in touch.
@@ -169,10 +177,10 @@ public static class EmailTemplates- Great news – access for {displayDomain} has been activated and is ready to use. + Access for {displayDomain} has been activated and is ready to use. You can now sign in and start monitoring your Windows Autopilot enrollments in real time.
@@ -195,17 +203,15 @@ public static class EmailTemplates- Your feedback is incredibly valuable and helps shape the product. If you run into issues - or have ideas for improvements, please don't hesitate to reach out: + Questions, problems or ideas for improvements are welcome:
- Thanks for being part of the journey – enjoy Autopilot Monitor! + Thank you for using Autopilot Monitor.