Exemple #1
0
        internal Pop3Message(long position, long size, Socket client)
        {
            _inboxPosition = position;
            _client        = client;

            _pop3State = new Pop3StateObject {
                WorkSocket = _client, Sb = new StringBuilder()
            };

            // load email ...
            LoadEmail();

            // get body (if it exists) ...
            IEnumerator multipartEnumerator =
                MultipartEnumerator;

            while (multipartEnumerator.MoveNext())
            {
                var multipart = (Pop3Component)
                                multipartEnumerator.Current;

                if (multipart.IsBody)
                {
                    _body = multipart.Data;
                    break;
                }
            }
        }
Exemple #2
0
        private void LoadEmail()
        {
            // tell pop3 server we want to start reading
            // email (m_inboxPosition) from inbox ...

            Send("retr " + _inboxPosition);

            // start receiving email ...
            StartReceive();

            // parse email ...
            ParseEmail(
                _pop3State.Sb.ToString().Split('\r'));

            // remove reading pop3State ...
            _pop3State = null;
        }
Exemple #3
0
        internal Pop3Message(long position, long size, Socket client)
        {
            _inboxPosition = position;
            _client        = client;

            _pop3State = new Pop3StateObject {
                WorkSocket = _client, Sb = new StringBuilder()
            };

            // load email ...
            LoadEmail();

            // get body (if it exists) ...
            foreach (var multipart in this)
            {
                if (multipart.IsBody)
                {
                    _body = multipart.Data;
                    break;
                }
            }
        }
Exemple #4
0
		internal Pop3Message(long position, long size, Socket client)
		{
			_inboxPosition = position;
			_client = client;

			_pop3State = new Pop3StateObject {WorkSocket = _client, Sb = new StringBuilder()};

		    // load email ...
			LoadEmail();

			// get body (if it exists) ...
			IEnumerator multipartEnumerator =
				MultipartEnumerator;

			while( multipartEnumerator.MoveNext() )
			{
				var multipart = (Pop3Component)
					multipartEnumerator.Current;

				if( multipart.IsBody )
				{
					_body = multipart.Data;
					break;
				}
			}
		}
Exemple #5
0
		private void LoadEmail()
		{
			// tell pop3 server we want to start reading
			// email (m_inboxPosition) from inbox ...

			Send("retr "+_inboxPosition);

			// start receiving email ...
			StartReceive();

			// parse email ...
			ParseEmail(
				_pop3State.Sb.ToString().Split(new[] { '\r'}));

			// remove reading pop3State ...
			_pop3State = null;
		}