2025-05-06 06:45:49 +00:00
|
|
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
|
|
using Volo.Abp.Emailing;
|
|
|
|
|
|
using Volo.Abp.Settings;
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
namespace Erp.Sender.Mail.AmazonSes;
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Base implementation of <see cref="IAmazonSesEmailSenderConfiguration"/> that reads settings
|
|
|
|
|
|
/// from <see cref="ISettingProvider"/>.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class AmazonSesEmailSenderConfiguration :
|
|
|
|
|
|
EmailSenderConfiguration,
|
|
|
|
|
|
IAmazonSesEmailSenderConfiguration,
|
|
|
|
|
|
ITransientDependency
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Creates a new <see cref="AmazonSesEmailSenderConfiguration"/>.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public AmazonSesEmailSenderConfiguration(ISettingProvider settingProvider)
|
|
|
|
|
|
: base(settingProvider)
|
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetProfileAsync() =>
|
|
|
|
|
|
GetNotEmptySettingValueAsync(AmazonSesEmailSettingNames.Profile);
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetRegionAsync() =>
|
|
|
|
|
|
GetNotEmptySettingValueAsync(AmazonSesEmailSettingNames.Region);
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetAccessKeyAsync() =>
|
|
|
|
|
|
GetNotEmptySettingValueAsync(AmazonSesEmailSettingNames.AccessKey);
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetAccessKeyIdAsync() =>
|
|
|
|
|
|
GetNotEmptySettingValueAsync(AmazonSesEmailSettingNames.AccessKeyId);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2025-11-11 19:49:52 +00:00
|
|
|
|
|