Overview

Camel is a mail access library that provides a complete, portable, and object-oriented framework for reading, writing, sending, and storing mail.

Using libcamel

Call camel_init() before using the library, and camel_shutdown() when done.

The main entry point to the Camel library is the CamelSession, it is the main application context and must be subclassed.

Core mail handling

Writing a provider

Miscellaneous API

The camel_mime_utils.h header provides a wide collection of MIME and RFC 822 related utility functions used extensively throughout the library covering:

  • Character class detection — a fast, table-driven set of macros for classifying individual characters according to RFC character classes (atoms, LWSP, tspecials, etc.).

  • Content-Transfer-Encoding — highly optimised base64, quoted-printable, and UUencoding encoders and decoders.

  • Raw header parsing — low-level tokenisers for MIME headers.

  • Structured header handling — parsers and formatters for Date, Address, Content-Type, Content-Disposition, Content-ID, References, and Newsgroups headers with full RFC 2047 support.

  • Header folding — utilities for folding and unfolding long header values according to RFC 2822.

Many of these functions represent years of production mail-client testing and are highly optimised. For most purposes, the higher-level interfaces on CamelMimePart, CamelMimeMessage, and CamelInternetAddress should be preferred.