Example #1
0
 private void OnDeliverMailItemHandler(DeliverMailItemEventSource source, DeliverMailItemEventArgs e)
 {
     Logger.Debug("[GenericTransportAgent] DeliveryAgent - OnDeliverMailItem fired...");
     foreach (var x in Configuration.Config.DeliveryAgentConfig.OnDeliverMailItem)
     {
         try
         {
             x.Execute(new EmailItem(e.DeliverableMailItem));
         }
         catch (Exception ex)
         {
             Logger.Error(ex, @"Error executing ""OnDeliverMailItem""");
         }
     }
 }
 private void OnDeliverMailItemHandler(DeliverMailItemEventSource source, DeliverMailItemEventArgs e)
 {
     Logger.Debug("[GenericExchangeTransportagent] [DeliveryAgent] OnDeliverMailItem fired...");
     _config.DeliveryAgentConfig.OnDeliverMailItem.ToList().ForEach(x => { try { x.Execute(new EmailItem(e.DeliverableMailItem)); } catch (Exception ex) { Logger.Error(ex, @"Error executing ""OnDeliverMailItem"""); } });
 }
 private void OnDeliverMailItemHandler(DeliverMailItemEventSource source, DeliverMailItemEventArgs e)
 {
     Logger.Debug("[GenericTransportAgent] DeliveryAgent - OnDeliverMailItem fired...");
     _config.DeliveryAgentConfig.OnDeliverMailItem.ToList().ForEach(x => { try { x.Execute(new EmailItem(e.DeliverableMailItem)); } catch (Exception ex) { Logger.Error(ex, @"Error executing ""OnDeliverMailItem"""); } });
 }