Beispiel #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
            {
            }
        }
Beispiel #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
            {
            }
        }
Beispiel #3
0
        protected virtual void RejectMessage(ISmtpMessage message, bool?isIncoming)
        {
            try
            {
                message.Reject();

                m_auditor.Log(AuditNames.Message.GetRejectedMessage(isIncoming), this.BuildAuditLogString(message));

                Logger.Debug("Rejected Message");

                this.CopyMessage(message, m_settings.BadMessage);
            }
            catch
            {
            }
        }
Beispiel #4
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
            {
            }
        }
Beispiel #5
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
            {
            }
        }
Beispiel #6
0
        protected virtual void RejectMessage(ISmtpMessage message, bool? isIncoming)
        {
            try
            {
                message.Reject();

                m_auditor.Log(AuditNames.Message.GetRejectedMessage(isIncoming), this.BuildAuditLogString(message));
                
                Logger.Debug("Rejected Message");
                
                this.CopyMessage(message, m_settings.BadMessage);
            }
            catch
            {
            }
        }