Send notifications via IMessagingServiceClient and PublishEmailViaSmtpCommand instead of the static EmailSender. The sender address now comes from NotificationOptions and attachments are added through the command builder. Rename the Notify parameter to receiverEmail so the call site contract is explicit.
19 lines
651 B
C#
19 lines
651 B
C#
namespace EnvelopeGenerator.Application.Common.Interfaces.Services.Notification;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public interface IEnvelopeNotificationService
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <typeparam name="TEnvelopeNotificationBase"></typeparam>
|
|
/// <param name="receiverEmail"></param>
|
|
/// <param name="notification"></param>
|
|
/// <param name="cancel"></param>
|
|
/// <returns></returns>
|
|
public Task Notify<TEnvelopeNotificationBase>(string receiverEmail, TEnvelopeNotificationBase notification, CancellationToken cancel = default)
|
|
where TEnvelopeNotificationBase : EnvelopeNotificationBase;
|
|
}
|