Skip to content
Dmitry Boyarintsev edited this page Nov 14, 2021 · 6 revisions

The front mail client classes to be used are ImapClient and Pop3Client classes. Both are descendants from TextClient, the class that's designed to support text-based network protocols.

  • Mail Client classes are disposable (since TextClient is IDisposable), and thus should be treated as such, either by applying using syntax, or calling Dispose() explicitly.
  • Internally the socket connection is retained until disposed.
  • Each methods is synchronous
  • Each class should be treated as thread-unsafe (as they're thread-unsafe)

Connecting

  • The connection information could be either passed as constructor parameter. (In which case the connection will be attempted at the time of constructor)
  • The connection can be initiated by calling Connect() method (declared at TextClient)

Message Parsing

The backbone of the emails (or rather internet messaging) is parsing of the mime-text. You might find the actual implementation of mime-structure parsing at MailMessage.cs ParseMime() method.

Exceptions

Any method can throw Exception class. See here

Clone this wiki locally