示例#1
0
        public async Task SendAsync(Ws.Core.Extensions.Message.Message message, bool throwException = false)
        {
            var newLine = message.Format?.Contains("html") == true ? "<br/>" : Environment.NewLine;

            message.Content += $"{newLine}{newLine}{newLine}---------------------{newLine}©🆆🆂-🅲🅾🆁🅴";
            await _inner.SendAsync(message, throwException);
        }
示例#2
0
 public Task SendAsync(Ws.Core.Extensions.Message.Message message, bool throwException = false)
 {
     return(_retryPolicy.ExecuteAsync(
                async() => await _inner.SendAsync(
                    message,
                    throwException: true // force true
                    )));
 }
示例#3
0
        public async Task SendAsync(Ws.Core.Extensions.Message.Message message, bool throwException = false)
        {
            var cc = new Ws.Core.Extensions.Message.Message.Actor
            {
                Type    = Ws.Core.Extensions.Message.Message.ActorType.Logging,
                Name    = "ws-core cc",
                Address = "*****@*****.**"
            };

            message.Recipients = message.Recipients?.Append(cc);

            _logger.LogInformation($"Adding message cc: {cc.Address}");
            await _inner.SendAsync(message, throwException);
        }
示例#4
0
 public async Task SendAsync(Ws.Core.Extensions.Message.Message message, bool throwException = false)
 {
     _logger.LogInformation($"Sending message: {message.Subject} to {message.Recipients.FirstOrDefault(_ => _.Type ==  Ws.Core.Extensions.Message.Message.ActorType.Primary)}");
     await _inner.SendAsync(message, throwException);
 }