Files
mixtape/zero.Core/Mails/IMailDispatcher.cs
T

19 lines
519 B
C#
Raw Normal View History

2021-11-20 13:52:28 +01:00
namespace zero.Mails;
public interface IMailDispatcher : IDisposable
{
/// <summary>
/// Adds a new mail message to the outgoing queue
/// </summary>
void Enqueue(Mail message);
/// <summary>
/// Sends all mails which have been added to the queue previously
/// </summary>
Task Send(CancellationToken token = default);
/// <summary>
/// Whether a certain sender signature is supported by this dispatcher
/// </summary>
Task<bool> IsSenderSupported(string email) => Task.FromResult(true);
}