private static MessageStatus ProcessSmtpResponseException(SmtpResponseException smtpResponseException, IMessageConverter converter)
        {
            MessageStatus status = smtpResponseException.Status;

            if (status.Action == MessageAction.NDR)
            {
                converter.LogMessage(smtpResponseException);
            }
            return(status);
        }
Exemplo n.º 2
0
        private static Handler CreateHandlerFromSmtpResponseException(SmtpResponseException smtpResponseException)
        {
            Handler handler = new Handler
            {
                Action   = smtpResponseException.Status.Action,
                Response = smtpResponseException.Status.Response,
                IncludeDiagnosticStatusText = false
            };

            if (smtpResponseException.Status.RetryInterval != null)
            {
                handler.SpecifiedRetryInterval = new TimeSpan?(smtpResponseException.Status.RetryInterval.Value);
            }
            return(handler);
        }