MailBee. NET Objects Tutorials

POP3 folders

Some mail servers can be configured to provide access to IMAP folders through POP3. This functionality is uncommon so you should refer your mail server documentation on this matter. Usually, if the server supports accessing multiple folders through POP3, selecting a folder is performed on the login stage:

C#

Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
pop.Login("inbox#jdoe", "secret");

VB.NET

Dim pop As New Pop3() 
pop.Connect("mail.domain.com")
pop.Login("inbox#jdoe", "secret")

Some servers may require you to specify folder name AFTER login name, or use another character (not '#') as a separator. This all depends on the server configuration. Some examples:

C#

pop.Login("jdoe#inbox", "secret");

VB.NET

pop.Login("jdoe#inbox", "secret")

C#

pop.Login("jdoe@domain.com#inbox", "secret");

VB.NET

pop.Login("jdoe@domain.com#inbox", "secret")

C#

pop.Login("inbox#jdoe@domain.com", "secret");

VB.NET

pop.Login("inbox#jdoe@domain.com", "secret")

The developer can use any method of Pop3 object to operate with messages in the specified folder. In other words, each folder is treated as an independent POP3 account.