Value

When MailBee encounters any error, it throws the MailBeeException.
However, MailBee can trap this exception if the error was not critical. For instance,
if the POP3 server responds with a negative reply to an optional POP3 command (such as
CAPA), the MailBeeException will be thrown and then trapped by MailBee itself,
but no exception will be thrown to the application code. Such errors are called warnings.

ErrorOccurred event allows the developer to track both warnings and critical
errors because it's raised for a particular exception even if MailBee will trap this
exception and do not pass it to the application code.

Examples

This sample logs all the warnings and critical errors issued during the POP3 session into the console.
If the connection succeeds and the POP3 server does support CAPA command, no output will be produced.
The sample is written for a console application.