diff --git a/SushiBar/SushiBar/App.config b/SushiBar/SushiBar/App.config
index 7d2b7c1..5358022 100644
--- a/SushiBar/SushiBar/App.config
+++ b/SushiBar/SushiBar/App.config
@@ -1,11 +1,11 @@
-
-
-
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/SushiBar/SushiBarClientApi/appsettings.json b/SushiBar/SushiBarClientApi/appsettings.json
index 5fa563a..86fe7e8 100644
--- a/SushiBar/SushiBarClientApi/appsettings.json
+++ b/SushiBar/SushiBarClientApi/appsettings.json
@@ -6,5 +6,17 @@
}
},
"AllowedHosts": "*",
- "IPAddress": "http://localhost:5050"
+
+ "IPAddress": "http://localhost:5050",
+
+ "MailConfigBindingModel": {
+ "SmtpClientHost": "smtp.yandex.ru",
+ "SmtpClientPort": 465,
+
+ "PopHost": "pop.yandex.com",
+ "PopPort": 995,
+
+ "MailLogin": "tester.b.moio@ya.ru",
+ "MailPassword": "pyzzqswchjevecec"
+ }
}
diff --git a/SushiBar/SushiBarRestApi/Program.cs b/SushiBar/SushiBarRestApi/Program.cs
index e926907..78db750 100644
--- a/SushiBar/SushiBarRestApi/Program.cs
+++ b/SushiBar/SushiBarRestApi/Program.cs
@@ -1,7 +1,10 @@
using SushiBarBusinessLogic.BusinessLogics;
+using SushiBarBusinessLogic.MailWorker;
+using SushiBarContracts.BindingModels;
using SushiBarContracts.BusinessLogicsContracts;
using SushiBarContracts.StoragesContracts;
using SushiBarDatabaseImplement.Implements;
+using static Org.BouncyCastle.Math.EC.ECCurve;
var builder = WebApplication.CreateBuilder(args);
builder.Logging.SetMinimumLevel(LogLevel.Information);
@@ -19,9 +22,11 @@ builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
-
var app = builder.Build();
+MailConfigBindingModel? mailSender = builder.Configuration.GetSection("MailConfigBindingModel").Get();
+app.Services.GetService()?.MailConfig(mailSender!);
+
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{