A large message can be stored by separating the message into an envelope
portion containing information such as headers, protocols, and addresses,
and a payload portion containing items such as file attachments. The
envelope portion can be stored in local storage, while the payload can be
stored to a persistent store. The message can be processed incrementally,
such that the entire message is never in system memory. Once the envelope
portion is processed, the payload portion can be read in increments
without being processed, and those increments written directly to the
persistent store. Alternatively, the payload can be streamed to the
persistent store. A pointer in the envelope can then be used to locate
and retrieve attachments from persistent storage.This description is not
intended to be a complete description of, or limit the scope of, the
invention. Other features, aspects, and objects of the invention can be
obtained from a review of the specification, the figures, and the claims.