An extended SMTP responses.
Inheritance: SMTPResponse
Exemplo n.º 1
0
        protected IEnumerable <SMTPExtendedResponse> ReadSMTPResponses()
        {
            var ResponseList        = new List <SMTPExtendedResponse>();
            SMTPExtendedResponse SR = null;

            do
            {
                SR = this.ReadSMTPResponse();
                ResponseList.Add(SR);
            } while (SR.MoreDataAvailable);

            return(ResponseList);
        }
Exemplo n.º 2
0
        // SMTP Logging...

        #region LogError(ServerTimestamp, EMail, Response, Error = null, LastException = null)

        /// <summary>
        /// Log an error during request processing.
        /// </summary>
        /// <param name="ServerTimestamp">The timestamp of the incoming request.</param>
        /// <param name="EMail">The incoming request.</param>
        /// <param name="HTTPResponse">The outgoing response.</param>
        /// <param name="Error">The occured error.</param>
        /// <param name="LastException">The last occured exception.</param>
        public void LogError(DateTime ServerTimestamp,
                             String SMTPCommand,
                             EMail EMail,
                             SMTPExtendedResponse Response,
                             String Error            = null,
                             Exception LastException = null)
        {
            var ErrorLogLocal = ErrorLog;

            if (ErrorLogLocal != null)
            {
                ErrorLogLocal(this, ServerTimestamp, SMTPCommand, EMail, Response, Error, LastException);
            }
        }
Exemplo n.º 3
0
        private void NotifyErrors(TCPConnection TCPConnection,
                                  DateTime Timestamp,
                                  String SMTPCommand,
                                  SMTPStatusCode SMTPStatusCode,
                                  EMail EMail = null,
                                  SMTPExtendedResponse Response = null,
                                  String Error            = null,
                                  Exception LastException = null,
                                  Boolean CloseConnection = true)
        {
            var ErrorLogLocal = ErrorLog;

            if (ErrorLogLocal != null)
            {
                ErrorLogLocal(this, Timestamp, SMTPCommand, EMail, Response, Error, LastException);
            }
        }