Click here to Skip to main content
15,897,704 members
Articles / Programming Languages / C#

Advanced MIME Parser/Creator/Editor

Rate me:
Please Sign up or sign in to vote.
4.91/5 (66 votes)
5 Oct 2005 1M   7.7K   116  
An advanced MIME parser/creator/editor application.
using System;

namespace LumiSoft.Net.POP3.Server
{
	/// <summary>
	/// Holds POP3_Message info (ID,Size,...).
	/// </summary>
	public class POP3_Message
	{
		private POP3_Messages m_pMessages       = null;
		private string        m_MessageID       = "";    // Holds message ID.
		private string        m_MessageUID      = "";
		private int           m_MessageSize     = 0;     // Holds message size.
		private bool          m_MarkedForDelete = false; // Holds marked for delete flag.
		private object        m_Tag             = null;
		
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="messages"></param>
		public POP3_Message(POP3_Messages messages)
		{	
			m_pMessages = messages;
		}

		#region Properties Implementation

		/// <summary>
		/// Gets or sets message ID.
		/// </summary>
		public string MessageID
		{
			get{ return m_MessageID; }

			set{ m_MessageID = value; }
		}

		/// <summary>
		/// Gets or sets message UID. This UID is reported in UIDL command.
		/// </summary>
		public string MessageUID
		{
			get{ return m_MessageUID; }

			set{ m_MessageUID = value; }
		}

		/// <summary>
		/// Gets or sets message size.
		/// </summary>
		public int MessageSize
		{
			get{ return m_MessageSize; }

			set{ m_MessageSize = value; }
		}

		/// <summary>
		/// Gets or sets message state flag.
		/// </summary>
		public bool MarkedForDelete
		{
			get{ return m_MarkedForDelete; }

			set{ m_MarkedForDelete = value; }
		}

		/// <summary>
		/// Gets message number. NOTE message number is 1 based (not zero based).
		/// </summary>
		public int MessageNr
		{
			get{ return m_pMessages.Messages.IndexOf(this)+1; }
		}

		/// <summary>
		/// Gets or sets user data for message.
		/// </summary>
		public object Tag
		{
			get{ return m_Tag; }

			set{ m_Tag = value; }
		}

		#endregion

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Estonia Estonia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions