protected virtual void RejectMessage(ISmtpMessage message, MessageEnvelope envelope, bool?incoming) { try { message.Reject(); Auditor?.ForEach(a => a.Log(AuditNames.Message.GetRejectedMessage(incoming), a.BuildAuditLogMessage.Build(message))); Logger.Debug("Rejected Message"); if (!incoming.GetValueOrDefault(false) && envelope.ShouldDeliverFailedStatus(m_settings.Notifications)) { var outgoingMessage = BuildFailedOutgoingMessage(envelope); SendDeliveryStatus(outgoingMessage); } else { this.CopyMessage(message, m_settings.BadMessage); } } catch { } }
protected virtual void RejectMessage(ISmtpMessage message, bool?incoming) { try { message.Reject(); Auditor?.ForEach(a => a.Log(AuditNames.Message.GetRejectedMessage(incoming), a.BuildAuditLogMessage.Build(message))); Logger.Debug("Rejected Message"); this.CopyMessage(message, m_settings.BadMessage); } catch { } }
protected virtual void AcceptMessage(ISmtpMessage message, bool incoming) { message.Accept(); Auditor?.ForEach(a => a.Log(AuditNames.Message.GetAcceptedMessage(incoming), a.BuildAuditLogMessage.Build(message))); }