|
@@ -626,8 +626,18 @@ IES Morning Report:
|
|
|
var coreUser = coreUsers.Find(x => x.id.Equals(teacher.id) && !string.IsNullOrWhiteSpace(x.mail));
|
|
|
if (coreUser!=null)
|
|
|
{
|
|
|
- var token = _mailFactory.GetSmtpClient().SendEmail(_azureCosmos, dingDing, eventId, title, template, coreUser.mail, teacher.id, teacher.name, sender: "TEAMModel");
|
|
|
- // await coreAPIHttpService.SendMail(new Dictionary<string, object> { { "to", coreUser.mail },{ "tid","1234" },{ "vars",new { title=title,body=template } } } ,coreAPIHttpService.options.location,_configuration);
|
|
|
+ // var token = _mailFactory.GetSmtpClient().SendEmail(_azureCosmos, dingDing, eventId, title, template, coreUser.mail, teacher.id, teacher.name, sender: "TEAMModel");
|
|
|
+ //var tid = lang.Equals("zh-cn") ? "d-136eddbd974046f1a721c8f4e210b9bf" : lang.Equals("zh-tw") ? "d-136eddbd974046f1a721c8f4e210b9bf" : "d-95ac2d657d1b4d9dbb7b79defc17f714";
|
|
|
+ var tid = string.Empty;
|
|
|
+ if (coreAPIHttpService.options.location.Contains("China"))
|
|
|
+ {
|
|
|
+ tid= "IES5GeneralTemplate";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ tid= lang.Equals("zh-tw") ? "d-136eddbd974046f1a721c8f4e210b9bf" : "d-95ac2d657d1b4d9dbb7b79defc17f714";
|
|
|
+ }
|
|
|
+ await coreAPIHttpService.SendMail(new Dictionary<string, object> { { "to", coreUser.mail }, { "tid", tid }, { "vars", new { title = title, notificationcontent = template } } }, coreAPIHttpService.options.location, _configuration);
|
|
|
}
|
|
|
notify.Append(template);
|
|
|
}
|
|
@@ -675,8 +685,18 @@ IES Morning Report:
|
|
|
var coreUser = coreUsers.Find(x => x.id.Equals(teacher.id) && !string.IsNullOrWhiteSpace(x.mail));
|
|
|
if (coreUser!=null)
|
|
|
{
|
|
|
- var token = _mailFactory.GetSmtpClient().SendEmail(_azureCosmos, dingDing, eventId, title, template, coreUser.mail, teacher.id, teacher.name,sender:"TEAMModel");
|
|
|
- //await coreAPIHttpService.SendMail(new Dictionary<string, object> { { "to", coreUser.mail }, { "tid", "1234" }, { "vars", new { title = title, body = template } } }, coreAPIHttpService.options.location, _configuration);
|
|
|
+ // var token = _mailFactory.GetSmtpClient().SendEmail(_azureCosmos, dingDing, eventId, title, template, coreUser.mail, teacher.id, teacher.name,sender:"TEAMModel");
|
|
|
+
|
|
|
+ var tid = string.Empty ;
|
|
|
+ if (coreAPIHttpService.options.location.Contains("China"))
|
|
|
+ {
|
|
|
+ tid=lang.Equals("zh-cn") ? "IES5GeneralTemplate" : lang.Equals("zh-tw") ? "IES5GeneralTemplate" : "IES5GeneralTemplate";
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ tid=lang.Equals("zh-cn")? "d-270b4ec690f541a9a4045d7a4032bc3b" : lang.Equals("zh-tw") ? "d-136eddbd974046f1a721c8f4e210b9bf" : "d-95ac2d657d1b4d9dbb7b79defc17f714";
|
|
|
+ }
|
|
|
+
|
|
|
+ await coreAPIHttpService.SendMail(new Dictionary<string, object> { { "to", coreUser.mail }, { "tid", tid }, { "vars", new { title = title, notificationcontent = template } } }, coreAPIHttpService.options.location, _configuration);
|
|
|
}
|
|
|
notify.Append(template);
|
|
|
}
|