using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Registration.Services;

namespace Registration.Services
{
    public static class EmailSenderExtensions
    {
        public static Task SendEmailConfirmationAsync(this IEmailSender emailSender, string email, string link)
        {
            return emailSender.SendEmailAsync(email, "Potwierdź adres e-mail",
                $"Potwierdź konto klikając to <a href='{HtmlEncoder.Default.Encode(link)}'>łącze</a>");
        }
    }
}
