private void CreateTrackingMail(int id, string mailTo)
        {
            var message = File.ReadAllText(@"..\WebApplication1\wwwroot\emails\trackingMail.html");

            var replace = $"{id}";

            message = message.Replace("#PackageNumber#", replace);

            var mail = new MailDto()
            {
                Address = mailTo,
                Message = message,
                Subject = "Śledzenie przesyłki"
            };

            _mailService.EnqueueMail(mail);
        }
        public void SendReviewLink(string mailTo, string link)
        {
            var message = File.ReadAllText(@"..\WebApplication1\wwwroot\emails\reviewMail.html");

            var replace = $"https://localhost:44380/review/create?link={link}";

            message = message.Replace("#ReviewLinkForCustomer#", replace);

            var mail = new MailDto()
            {
                Address = mailTo,
                Message = message,
                Subject = "Wystaw opinię"
            };

            _mailService.EnqueueMail(mail);
        }
示例#3
0
        private void SendPassword(CreateApplicationUserViewModel model)
        {
            var message = File.ReadAllText(@"..\WebApplication1\wwwroot\emails\loginMail.html");

            var replace = $"{model.Email}";

            message = message.Replace("#UserLogin#", replace);

            replace = $"{model.Password}";

            message = message.Replace("#UserPassword#", replace);

            var mail = new MailDto()
            {
                Address = model.Email,
                Message = message,
                Subject = "Dane do logowania"
            };

            _mailService.EnqueueMail(mail);
        }