private void OnDataCommandHandler(ReceiveCommandEventSource source, DataCommandEventArgs e) { Logger.Debug("[GenericTransportAgent] SmtpReceiveAgent - OnDataCommand fired..."); foreach (var x in Configuration.Config.SmtpReceiveAgentConfig.OnDataCommand) { try { x.Execute(new EmailItem(e.MailItem)); } catch (Exception ex) { Logger.Error(ex, @"Error executing ""OnDataCommand"""); } } }
void OnDataCommandHandler(ReceiveCommandEventSource source, DataCommandEventArgs e) { Logger.Debug("[GenericTransportAgent] SmtpReceiveAgent - OnDataCommand fired..."); _config.SmtpReceiveAgentConfig.OnDataCommand.ToList().ForEach(x => { try { x.Execute(new EmailItem(e.MailItem)); } catch (Exception ex) { Logger.Error(ex, @"Error executing ""OnDataCommand"""); } }); }
void OnDataCommandHandler(ReceiveCommandEventSource source, DataCommandEventArgs e) { Logger.Debug("[GenericExchangeTransportagent] [SmtpReceiveAgent] OnDataCommand fired..."); _config.SmtpReceiveAgentConfig.OnDataCommand.ToList().ForEach(x => { try { x.Execute(new EmailItem(e.MailItem)); } catch (Exception ex) { Logger.Error(ex, @"Error executing ""OnDataCommand"""); } }); }