Compare commits
No commits in common. "aaec7a7b614f28b2b6b9f4cf73052cd37db318c1" and "6af6dbafc1d814f3eea6a95727dc4ee89c0e538c" have entirely different histories.
aaec7a7b61
...
6af6dbafc1
@ -5,7 +5,7 @@
|
|||||||
<add key="SmtpClientPort" value="587" />
|
<add key="SmtpClientPort" value="587" />
|
||||||
<add key="PopHost" value="pop.gmail.com" />
|
<add key="PopHost" value="pop.gmail.com" />
|
||||||
<add key="PopPort" value="995" />
|
<add key="PopPort" value="995" />
|
||||||
<add key="MailLogin" value="rpplab7chernyshev@gmail.com" />
|
<add key="MailLogin" value="ujijrujijr@gmail.com" />
|
||||||
<add key="MailPassword" value="cojg axan axbk qtqb" />
|
<add key="MailPassword" value="twkn exbj fkua jrlw" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
@ -61,7 +61,7 @@ namespace GarmentFactoryBusinessLogic.BusinessLogics
|
|||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(model.SenderName))
|
if (string.IsNullOrEmpty(model.SenderName))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("Не указана почта", nameof(model.SenderName));
|
throw new ArgumentNullException("Не указао почта", nameof(model.SenderName));
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(model.Subject))
|
if (string.IsNullOrEmpty(model.Subject))
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,8 @@ namespace GarmentFactoryBusinessLogic.MailWorker
|
|||||||
|
|
||||||
public async void MailSendAsync(MailSendInfoBindingModel info)
|
public async void MailSendAsync(MailSendInfoBindingModel info)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
|
if (string.IsNullOrEmpty(_mailLogin) ||
|
||||||
|
string.IsNullOrEmpty(_mailPassword))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -45,17 +46,20 @@ namespace GarmentFactoryBusinessLogic.MailWorker
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(info.MailAddress) || string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text))
|
if (string.IsNullOrEmpty(info.MailAddress) ||
|
||||||
|
string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject);
|
_logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress,
|
||||||
|
info.Subject);
|
||||||
await SendMailAsync(info);
|
await SendMailAsync(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void MailCheck()
|
public async void MailCheck()
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword))
|
if (string.IsNullOrEmpty(_mailLogin) ||
|
||||||
|
string.IsNullOrEmpty(_mailPassword))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Письма</h1>
|
<h1 class="display-4">Заказы</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Mails">Письма</a>
|
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Mails">Письма</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||||
|
@ -38,7 +38,6 @@ namespace GarmentFactoryDatabaseImplement.Implements
|
|||||||
using var context = new GarmentFactoryDatabase();
|
using var context = new GarmentFactoryDatabase();
|
||||||
return context.Clients.FirstOrDefault(x =>
|
return context.Clients.FirstOrDefault(x =>
|
||||||
(!string.IsNullOrEmpty(model.Email) && x.Email == model.Email && !string.IsNullOrEmpty(model.Password) && x.Password == model.Password) ||
|
(!string.IsNullOrEmpty(model.Email) && x.Email == model.Email && !string.IsNullOrEmpty(model.Password) && x.Password == model.Password) ||
|
||||||
(!string.IsNullOrEmpty(model.Email) && x.Email == model.Email && string.IsNullOrEmpty(model.Password)) ||
|
|
||||||
(model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
|
(model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ namespace GarmentFactoryDatabaseImplement.Models
|
|||||||
DateDelivery = model.DateDelivery,
|
DateDelivery = model.DateDelivery,
|
||||||
Subject = model.Subject,
|
Subject = model.Subject,
|
||||||
Body = model.Body,
|
Body = model.Body,
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
"SmtpClientPort": "587",
|
"SmtpClientPort": "587",
|
||||||
"PopHost": "pop.gmail.com",
|
"PopHost": "pop.gmail.com",
|
||||||
"PopPort": "995",
|
"PopPort": "995",
|
||||||
"MailLogin": "rpplab7chernyshev@gmail.com",
|
"MailLogin": "ujijrujijr@gmail.com",
|
||||||
"MailPassword": "cojg axan axbk qtqb"
|
"MailPassword": "twkn exbj fkua jrlw"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user