Beispiel #1
0
    public async Task FlushAsync()
    {
        if (_mailSettings.SendMode == MailSendMode.LocalDrop)
        {
            await _debugMailDispatchSession.FlushAsync();

            return;
        }

        while (_mailQueue.Count > 0)
        {
            var mailItem = _mailQueue.Dequeue();
            if (mailItem != null && _mailSettings.SendMode != MailSendMode.DoNotSend)
            {
                await _sendGridClient.SendEmailAsync(mailItem);
            }
        }
    }
Beispiel #2
0
 public Task FlushAsync()
 {
     return(_wrappedInstance.FlushAsync());
 }