fix(email): retire legacy SMTP follow-up
CI and Deploy / test (pull_request) Failing after 55s
CI and Deploy / deploy (pull_request) Has been skipped

Keep follow-up draft generation but remove the direct application SMTP delivery boundary. Route users to the provider-aware Job email flow and return 410 for legacy API callers.
This commit is contained in:
cesnimda
2026-08-10 00:43:52 +02:00
parent d7b556e494
commit 8fe39031ea
14 changed files with 46 additions and 96 deletions
@@ -103,9 +103,29 @@ public sealed class JobApplicationsFollowUpDraftTests
Assert.Contains("Maria Recruiter", payload.LastCorrespondenceFrom ?? string.Empty);
}
[Fact]
public void Legacy_follow_up_delivery_is_gone_and_has_no_smtp_dependency()
{
using var db = CreateDb();
var controller = CreateController(db, Mock.Of<ISummarizerService>(), "user-1");
var result = controller.SendFollowUp(42, new SendFollowUpRequest(
"recruiter@example.test",
"Synthetic subject",
"Synthetic body",
DateTime.UtcNow.AddDays(3)), default);
var gone = Assert.IsType<ObjectResult>(result);
Assert.Equal(StatusCodes.Status410Gone, gone.StatusCode);
Assert.Equal("Legacy email delivery retired", Assert.IsType<ProblemDetails>(gone.Value).Title);
Assert.Empty(db.Correspondences);
Assert.DoesNotContain(typeof(JobApplicationsController).GetConstructors().Single().GetParameters(),
parameter => parameter.ParameterType == typeof(IAppEmailSender));
}
private static JobApplicationsController CreateController(JobTrackerContext db, ISummarizerService summarizer, string userId)
{
var controller = new JobApplicationsController(db, summarizer, Mock.Of<IAppEmailSender>(), CreateUserManager().Object, NullLogger<JobApplicationsController>.Instance);
var controller = new JobApplicationsController(db, summarizer, CreateUserManager().Object);
controller.ControllerContext = new ControllerContext
{
HttpContext = new DefaultHttpContext