Exemplo n.º 1
0
 public async Task SendEmail(string address, string subject, string body)
 {
     await _fluentMailer.CreateMessage()
     .WithViewBody(body)
     .WithReceiver(address)
     .WithSubject(subject)
     .SendAsync();
 }
Exemplo n.º 2
0
        public async Task SendEmail(string email, string subject, string body)
        {
            try
            {
                await _fluentMailer.CreateMessage()
                .WithViewBody(body)
                .WithReceiver(email)
                .WithSubject(subject)
                .SendAsync();

                _loggerService.CreateLog(LoggerService.LogType.Info, "Message was sent", null);
            }
            catch (Exception ex)
            {
                _loggerService.CreateLog(LoggerService.LogType.Warning, "Messages was not sent", ex);
            }
        }