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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
´╗┐using System.Configuration;
using CPE.App.Web.Models;
using System.Net.Mail;

namespace CPE.App.Web.Helpers
{
    public class SendEmailHelperWeb
    {
        public static bool SendCertificateEmail(PurchasedCourse course)
        {
            //elucidat cert email
            var cDate = course.CertificateDate.Value.ToString("yyyyMMdd");
            MailMessage mail = new MailMessage(ConfigurationManager.AppSettings["EmailSender"], course.Email); 
            SmtpClient client = new SmtpClient();
            client.Port = 25;
            client.DeliveryMethod = SmtpDeliveryMethod.Network;
            client.UseDefaultCredentials = false;
            client.Host = "localhost";
            mail.Subject = ConfigurationManager.AppSettings["EmailSubject"];            
            string mailBodyText = CPE.Utilities.Email.RenderEmail(course.ContentUrl, course.CertificateDate, course.Ticket);
            mail.Body = mailBodyText;
            mail.IsBodyHtml = true;
            client.Send(mail);
            return true;
        }
    }
}

Commits for CPE_learningsiteCPE/CPE.App/CPE.App.Web/Helpers/SendEmailHelper.cs

Diff revisions: vs.
Revision Author Commited Message
d90493 ... v.shishlov Sun 29 Aug, 2021 15:28:47 +0000

add ssl 1.2