изменения чтобы работало
This commit is contained in:
parent
757f22bfb5
commit
06a496aa5f
@ -2,10 +2,10 @@
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="SmtpClientHost" value="smtp.yandex.ru" />
|
||||
<add key="SmtpClientPort" value="465" />
|
||||
<add key="SmtpClientPort" value="587" />
|
||||
<add key="PopHost" value="pop.yandex.com" />
|
||||
<add key="PopPort" value="995" />
|
||||
<add key="MailLogin" value="tester.b.moio@ya.ru" />
|
||||
<add key="MailLogin" value="tester.b.moio@yandex.ru" />
|
||||
<add key="MailPassword" value="pyzzqswchjevecec" />
|
||||
</appSettings>
|
||||
</configuration>
|
@ -156,18 +156,26 @@ namespace SushiBarBusinessLogic.BusinessLogics
|
||||
}
|
||||
private bool SendOrderStatusMail(int clientId, string subject, string text)
|
||||
{
|
||||
var client = _clientLogic.ReadElement(new() { Id = clientId });
|
||||
if (client == null)
|
||||
try
|
||||
{
|
||||
var client = _clientLogic.ReadElement(new() { Id = clientId });
|
||||
if (client == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_mailWorker.MailSendAsync(new()
|
||||
{
|
||||
MailAddress = client.Email,
|
||||
Subject = subject,
|
||||
Text = text
|
||||
});
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_mailWorker.MailSendAsync(new()
|
||||
{
|
||||
MailAddress = client.Email,
|
||||
Subject = subject,
|
||||
Text = text
|
||||
});
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,12 +9,12 @@
|
||||
|
||||
"MailConfigBindingModel": {
|
||||
"SmtpClientHost": "smtp.yandex.ru",
|
||||
"SmtpClientPort": 465,
|
||||
"SmtpClientPort": 587,
|
||||
|
||||
"PopHost": "pop.yandex.com",
|
||||
"PopPort": 995,
|
||||
|
||||
"MailLogin": "tester.b.moio@ya.ru",
|
||||
"MailLogin": "tester.b.moio@yandex.ru",
|
||||
"MailPassword": "pyzzqswchjevecec"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user