Refactor email account handling for dynamic resolution
Reintroduced `EmailAccountDto` with conditional compilation to support both .NET and non-.NET environments. Updated `IEmailService` to accept `EmailAccountDto` as the sender, replacing reliance on pre-configured SMTP credentials. Added `GetSenderQuery` and its handler to dynamically resolve email accounts based on `Id` or `Username`. Introduced `GetSenderQueryValidator` for validation, ensuring proper usage of the query. Modified `SendEmailCommand` to include sender resolution via MediatR. Updated `OutgoingEmailEvent` to include sender information and adjusted `OutgoingEmailConsumer` and `LimilabsEmailService` to use the dynamically resolved sender. Updated `EmailMappingProfile` to ignore the `Sender` property during mapping. Replaced `Name` with `Id` in `appsettings.Secrets.json` for email accounts. Removed the old `EmailAccountDto` folder and performed general cleanup and restructuring.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"EmailAccounts": {
|
||||
"Accounts": [
|
||||
{
|
||||
"Name": "1",
|
||||
"Id": "1",
|
||||
"Username": "test-flow@digitaldata.works",
|
||||
"Password": "ddemail108",
|
||||
"PasswordEncrypted": false,
|
||||
|
||||
Reference in New Issue
Block a user