ActiveUp.Net.Mail.Mailbox.Subscribe C# (CSharp) Method

Subscribe() public method

Subscribes to the mailbox.
public Subscribe ( ) : string
return string
		public string Subscribe()
		{
			try
			{
				return this.SourceClient.SubscribeMailbox(this.Name);
			}
			catch(System.Net.Sockets.SocketException)
			{
				throw new Imap4Exception("Subscribe failed.\nThe mailbox' source client wasn't connected anymore.");
			}
		}

Usage Example

 /// <summary>
 /// Subscribe the client to the inbox
 /// </summary>
 private void SubscribeToInbox()
 {
     inbox = client.SelectMailbox("INBOX");
     inbox.Subscribe();
 }