From 04847391adb2804f38e9f88ec3255c0aa180e58a Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Fri, 19 Jun 2026 22:45:49 -0400 Subject: [PATCH] fix: wire AuthBlocks:Email:From into EmailConnection.FromAddress Mailtrap rejected invite sends because FromAddress was never populated. Adds the missing config assignment alongside Host/Token, and documents the From key in authblocks.example.json. --- DeepDrftAPI/Program.cs | 6 ++++-- DeepDrftAPI/environment/authblocks.example.json | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/DeepDrftAPI/Program.cs b/DeepDrftAPI/Program.cs index 2f6c936..7fcfc64 100644 --- a/DeepDrftAPI/Program.cs +++ b/DeepDrftAPI/Program.cs @@ -103,10 +103,12 @@ builder.Services.AddAuthBlocks(options => options.JwtSettings.Audience = builder.Configuration["AuthBlocks:Jwt:Audience"] ?? throw new InvalidOperationException("AuthBlocks:Jwt:Audience is required"); - options.EmailConnection.Host = builder.Configuration["AuthBlocks:Email:Host"] + options.EmailConnection.Host = builder.Configuration["AuthBlocks:Email:Host"] ?? throw new InvalidOperationException("AuthBlocks:Email:Host is required"); - options.EmailConnection.Token = builder.Configuration["AuthBlocks:Email:Token"] + options.EmailConnection.Token = builder.Configuration["AuthBlocks:Email:Token"] ?? throw new InvalidOperationException("AuthBlocks:Email:Token is required"); + options.EmailConnection.FromAddress = builder.Configuration["AuthBlocks:Email:From"] + ?? throw new InvalidOperationException("AuthBlocks:Email:From is required"); options.AdminUserSettings = new AdminUserSettings { diff --git a/DeepDrftAPI/environment/authblocks.example.json b/DeepDrftAPI/environment/authblocks.example.json index e7540f1..3a8b58f 100644 --- a/DeepDrftAPI/environment/authblocks.example.json +++ b/DeepDrftAPI/environment/authblocks.example.json @@ -8,7 +8,8 @@ }, "Email": { "Host": "smtp.your-provider.com", - "Token": "your-email-token-here" + "Token": "your-email-token-here", + "From": "noreply@yourdomain.com" }, "Admin": { "UserName": "admin",