Newer
Older
TestingWithoutInterfaces / src / Web / Extensions / EmailSenderExtensions.cs
@Derek Comartin Derek Comartin on 5 Dec 2022 523 bytes Init
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;

namespace Microsoft.eShopWeb.Web.Services;

public static class EmailSenderExtensions
{
    public static Task SendEmailConfirmationAsync(this IEmailSender emailSender, string email, string link)
    {
        return emailSender.SendEmailAsync(email, "Confirm your email",
            $"Please confirm your account by clicking this link: <a href='{HtmlEncoder.Default.Encode(link)}'>link</a>");
    }
}