Skip to content

[2515] fix configuration#1389

Merged
strongmindsaln merged 3 commits into
masterfrom
bugfix/kitosudv-2515-fix-configuration
May 4, 2026
Merged

[2515] fix configuration#1389
strongmindsaln merged 3 commits into
masterfrom
bugfix/kitosudv-2515-fix-configuration

Conversation

@strongmindsaln

@strongmindsaln strongmindsaln commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

KITOS Pull request template

Description

This pull request updates SMTP configuration handling to support authentication and SSL more robustly. The main changes add support for SMTP username and password in the SingleThreadedMailClient, ensure these credentials are used when configuring the mail client, and improve the handling of the EnableSsl and logging settings.

SMTP Authentication and Configuration:

  • Updated the SingleThreadedMailClient constructor to accept optional userName and password parameters and set SmtpClient.Credentials if provided, enabling SMTP authentication.
  • Modified dependency injection registration in KitosServiceRegistration.cs to read UserName and Password from configuration and pass them to the mail client.

Configuration and Deployment:

  • Changed appsettings.json default for Smtp:EnableSsl to "true" to improve security.
  • In PreparePackage.ps1, now sets Serilog.MinimumLevel.Default instead of Serilog.MinimumLevel and ensures Smtp.EnableSsl is set from the environment if provided.

Minor improvements:

  • Added missing using System.Net; in SingleThreadedMailClient.cs to support credential assignment.

Checklist

The following procedure dictates the steps needed before a Pull request can be merged into master.

  • Implement:
    All requirements are implemented and unit tests are green

  • Merge master into branch / rebase with master:
    Make sure you are testing your changes and how they co-exist with the latest version of master

  • Green on integration:
    All integration tests are green on integration

  • Add a description
    Under "Description" above, explain what was changed in this branch, and WHY it was changed

  • Request review:
    Tag whomever you wish to review your code

  • Review completed:
    Reviewer ticks this box when review comments have been submitted

  • Changes:
    PR owner and reviewer agrees on which changes must be made and the changes are committed.

  • Merge master into branch / rebase with master:
    Make sure you are testing your changes and how they co-exist with the latest version of master

  • Green on integration:
    All integration tests are green on integration

Copilot AI review requested due to automatic review settings April 28, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the deployment packaging script to correctly apply runtime configuration into appsettings.json during packaging, aligning generated JSON structure with the application’s expected configuration shape.

Changes:

  • Conditionally sets Smtp.EnableSsl from environment when provided.
  • Writes Serilog log level to Serilog:MinimumLevel:Default instead of overwriting MinimumLevel.

Comment thread DeploymentScripts/PreparePackage.ps1
@strongmindsaln
strongmindsaln merged commit 092f078 into master May 4, 2026
6 checks passed
@strongmindsaln
strongmindsaln deleted the bugfix/kitosudv-2515-fix-configuration branch May 4, 2026 05:17
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