btcpayserver/BTCPayServer/Services/Mails/ServerEmailSender.cs

24 lines
728 B
C#

using System;
using System.Threading.Tasks;
namespace BTCPayServer.Services.Mails
{
class ServerEmailSender : EmailSender
{
public ServerEmailSender(SettingsRepository settingsRepository,
IBackgroundJobClient backgroundJobClient) : base(backgroundJobClient)
{
if (settingsRepository == null)
throw new ArgumentNullException(nameof(settingsRepository));
SettingsRepository = settingsRepository;
}
public SettingsRepository SettingsRepository { get; }
public override Task<EmailSettings> GetEmailSettings()
{
return SettingsRepository.GetSettingAsync<EmailSettings>();
}
}
}