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

            if (status.Action == MessageAction.NDR)
            {
                converter.LogMessage(smtpResponseException);
            }
            return(status);
        }
Exemple #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);
        }