Removing TODOs with the actual implementation

This commit is contained in:
Elitsa Marinovska
2020-05-20 00:20:25 +02:00
parent ea380985db
commit e85ccb0dab
2 changed files with 25 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Mail;
using System.Runtime.Serialization;
using System.Security.Cryptography;
using System.Threading.Tasks;
@@ -500,17 +501,16 @@ namespace Umbraco.Web.Editors
UmbracoUserExtensions.GetUserCulture(to.Language, Services.TextService, GlobalSettings),
new[] { userDisplay.Name, from, message, inviteUri.ToString(), fromEmail });
// TODO: Port email service to ASP.NET Core
/*await UserManager.EmailService.SendAsync(
//send the special UmbracoEmailMessage which configures it's own sender
//to allow for events to handle sending the message if no smtp is configured
new UmbracoEmailMessage(new EmailSender(GlobalSettings, true))
{
Body = emailBody,
Destination = userDisplay.Email,
Subject = emailSubject
});*/
var emailSender = new EmailSender(GlobalSettings, true);
var mailMessage = new MailMessage()
{
Subject = emailSubject,
Body = emailBody,
IsBodyHtml = true
};
mailMessage.To.Add(to.Email);
await emailSender.SendAsync(mailMessage);
}
/// <summary>