все наконец то работает
This commit is contained in:
parent
1f5558c190
commit
dd020b8935
@ -102,7 +102,7 @@ namespace CarRepairShopBusinessLogic.BusinessLogics
|
||||
{
|
||||
throw new ArgumentNullException("Нет почты клиента", nameof(model.Email));
|
||||
}
|
||||
if (string.IsNullOrEmpty(model.Password))
|
||||
if (string.IsNullOrEmpty(model.Password) || !Regex.IsMatch(model.Password, @"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$", RegexOptions.IgnoreCase))
|
||||
{
|
||||
throw new ArgumentNullException("Нет пароля клиента", nameof(model.ClientFIO));
|
||||
}
|
||||
|
@ -120,6 +120,8 @@ namespace CarRepairShopBusinessLogic.BusinessLogics
|
||||
return false;
|
||||
}
|
||||
|
||||
element.Status = newStatus;
|
||||
|
||||
var clientView = _clientStorage.GetElement(new() { Id = element.ClientId });
|
||||
SendMail(clientView, element);
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SmtpClientHost": "smtp.gmail.com",
|
||||
"SmtpClientHost": "smtp.mail.ru",
|
||||
"SmtpClientPort": "587",
|
||||
"PopHost": "pop.gmail.com",
|
||||
"PopHost": "pop.mail.ru",
|
||||
"PopPort": "995",
|
||||
"MailLogin": "shotboll16@gmail.com",
|
||||
"MailPassword": "iexy xqps iwrj ihle"
|
||||
"MailLogin": "labwork7@mail.ru",
|
||||
"MailPassword": "i135ssgqi7jEzphpyVH9"
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="SmtpClientHost" value="smtp.gmail.com" />
|
||||
<add key="SmtpClientHost" value="smtp.mail.ru" />
|
||||
<add key="SmtpClientPort" value="587" />
|
||||
<add key="PopHost" value="pop.gmail.com" />
|
||||
<add key="PopHost" value="pop.mail.ru" />
|
||||
<add key="PopPort" value="995" />
|
||||
<add key="MailLogin" value="shotboll16@gmail.com" />
|
||||
<add key="MailPassword" value="iexy xqps iwrj ihle" />
|
||||
<add key="MailLogin" value="labwork7@mail.ru" />
|
||||
<add key="MailPassword" value="i135ssgqi7jEzphpyVH9" />
|
||||
</appSettings>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user