Git Repository Public Repository

CPE_learningsite

URLs

Copy to Clipboard

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 4cd176 ... vs d90493 ... for CPE/CPE.App/CPE.App.Web/Controllers/IndexController.cs

Diff revisions: vs.
  @@ -406,7 +406,7 @@
406 406 public ActionResult Email() {
407 407 var email = new MailMessage {
408 408 To = {
409 - "tallen@intesolv.com"
409 + "sophia@sophicsystems.com"
410 410 },
411 411 Subject = "[CPE] Email Test",
412 412 Body = "Email test has been received.",
  @@ -417,6 +417,23 @@
417 417
418 418 return Redirect("/");
419 419 }
420 + public ActionResult SendCerificateEmail(string email, string url, string key)
421 + {
422 + if (key != "q1w2e3") return Content("Bad key");
423 + var course = Database.PurchasedCourses
424 + .Where(c => c.Email == email && c.ContentUrl == url)
425 + .OrderByDescending(c => c.CertificateDate).FirstOrDefault();
426 +
427 + var done = SendEmailHelperWeb.SendCertificateEmail(course);
428 +
429 + var s = url.Split('-');
430 + var courseName = Database.CourseDetails
431 + .FirstOrDefault(c => c.ReleaseCode == s[1])?.Name;
432 +
433 + Utilities.LogWrapper.Info("[TinCanHelper][HandleStatement] {0} cert sent email={1} courseName={2}", DateTime.UtcNow.ToString("yyyyMMdd_HHmmss"), email, courseName);
434 +
435 + return Content("Certificate send successfully");
436 + }
420 437
421 438 [HttpPost]
422 439 public ActionResult Admin(string login, string passcode) {