Learn R Programming

emayili (version 0.4.4)

as.character.envelope: Create formatted message.

Description

Accepts a message object and formats it as a MIME document.

Usage

# S3 method for envelope
as.character(x, ...)

Arguments

x

A message object.

...

Further arguments passed to or from other methods.

Value

A formatted message object.

MIME Multipart Types

There are a number of options for multipart messages:

  • multipart/mixed <U+2014> Used for sending content with multiple independent parts either inline or as attachments. Each part can have different Content-Type.

  • multipart/alternative <U+2014> Used when each part of the message is an "alternative" version of the same content. The order of the parts is important: preferred and/or more complex formats should be found towards the end.

    Example: A message with both plain text and HTML versions.

  • multipart/digest <U+2014> Used to send multiple plain text messages.

  • multipart/related <U+2014> Used when each part of the the message represents a component of the complete message.

    Example: A web page with images.

  • multipart/signed <U+2014> Used when a message has a digital signature attached.

  • multipart/encrypted <U+2014> Used for a message with encrypted content.

A nice illustration of how some of these relate can be found at https://stackoverflow.com/a/40420648/633961.