Pop3QuickDownloadMessages Method (String, String, String)
Completely downloads all the messages in the inbox on the server, in a single line of code.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public static MailMessageCollection QuickDownloadMessages(
	string serverName,
	string accountName,
	string password
)

Parameters

serverName
Type: SystemString
The name or IP address of the POP3 server.
accountName
Type: SystemString
The user account name on the server.
password
Type: SystemString
The password of the user account on the server.

Return Value

Type: MailMessageCollection
A MailMessageCollection object containing the downloaded messages.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred.
Remarks

This method does not delete any messages in the inbox.

If the POP3 server supports pipelining, this method will download all the messages in a single network operation, which greatly increases performance and reduces network traffic.

Note Note
Static methods still require the valid license key be assigned to MailBee.Global.LicenseKey property (by either setting in in the code or in the config file such as app.config). All samples in MailBee documentation assume the license key is already set in the config file.

This method is not async, it's recommended (and in case of UWP platform it's mandatory) to use sync methods like DownloadEntireMessagesAsync.

Examples
This sample downloads all the messages in the inbox, and displays the index (an ordinal position in the inbox) and the attachments count of each message which has any attachments.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Pop3Mail;
using MailBee.Mime;

// The actual code (put it into a method of your class).
MailMessageCollection msgs = Pop3.QuickDownloadMessages("pop.server.com",
    "login", "password");
foreach (MailMessage msg in msgs)
{
    if (msg.HasAttachments)
    {
        Console.WriteLine("Message #" + msg.IndexOnServer +
            " has " + msg.Attachments.Count + " attachment(s)");
    }
}
See Also