예제 #1
0
        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
            {
            }
        }
예제 #2
0
        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
            {
            }
        }
예제 #3
0
        protected virtual void AcceptMessage(ISmtpMessage message, bool incoming)
        {
            message.Accept();

            Auditor?.ForEach(a => a.Log(AuditNames.Message.GetAcceptedMessage(incoming), a.BuildAuditLogMessage.Build(message)));
        }