Qore Mime Module Reference 1.3.1

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | List of all members
Mime::MultiPartMixedMessage Class Reference

implements a MultiPartMixedMessage class, a specialization of MultiPartMessage More...

Inheritance diagram for Mime::MultiPartMixedMessage:
[legend]

## Public Member Functions
| addEncodePart (data data, string enc, string content_type=MimeTypeText, string disp="inline", *hash hdr)
| adds a message part to the end of the list; encodes the data according to the transfer encoding argument passed More...
| addPart (data data, string content_type=MimeTypeText, string disp="inline", *hash hdr)
| adds a message part to the end of the list; the data muyst already be encoded and any Content-Transfer-Encoding header must already be present in hdr More...
| constructor (string boundary=MultiPartMessage::getBoundary())
| creates the object More...
hash | getMsgAndHeaders ()
| returns a hash of the message More...
| spliceEncodePart (data data, string enc, string content_type=MimeTypeText, string disp="inline", *hash hdr)
| adds a message part to the start of the list; encodes the data according to the transfer encoding argument passed More...
| splicePart (data data, string content_type=MimeTypeText, string disp="inline", *hash hdr)
| adds a message part to the start of the list; the data muyst already be encoded and any Content-Transfer-Encoding header must already be present in hdr More...
Public Member Functions inherited from Mime::MultiPartMessage
| constructor (string mptype, string boundary=MultiPartMessage::getBoundary())
| creates the object More...
binary | serialize ()
| serializes the message and returns a binary object ready to send over a socket

## Additional Inherited Members
Static Public Member Functions inherited from Mime::MultiPartMessage
static string | getBoundary ()
| returns a string embedded with the current timestamp designed to be used as MultiPart boundary string
static string | getRandomString (int len)
| returns a string of random characters More...
static hash | parseBody (string boundary, string body, bool decode=True)
| returns a hash representing a parsed multipart message body from a boundary string and body arguments More...
static binary | serializeHeaders (hash hdr)
| serializes a header hash to a binary object More...

## Detailed Description

implements a MultiPartMixedMessage class, a specialization of MultiPartMessage

## Member Function Documentation

Mime::MultiPartMixedMessage::addEncodePart | ( | data | data,
|  | string | enc,
|  | string | content_type = `MimeTypeText`,
|  | string | disp = `"inline"`,
|  | *hash | hdr
| ) |  |

adds a message part to the end of the list; encodes the data according to the transfer encoding argument passed

Parameters

  data | the unencoded data for the part
  enc | the transfer encoding to use for the part; see MIME Content Transfer Encoding Constants for possible values
  content_type | the content_type for the part
  disp | the Content-Disposition header (ex: `'inline'`, `'attachment`; filename="file.txt"')
  hdr | an optional hash of headers for the part

Exceptions

  MIME-TRANSFER-ENCODING-ERROR | unknown transfer encoding
  PART-ERROR | empty content type argument passed

See Also
  - MultiPartMixedMessage::addPart()
  - MultiPartMixedMessage::splicePart()
  - MultiPartMixedMessage::spliceEncodePart()

Mime::MultiPartMixedMessage::addPart | ( | data | data,
|  | string | content_type = `MimeTypeText`,
|  | string | disp = `"inline"`,
|  | *hash | hdr
| ) |  |

adds a message part to the end of the list; the data muyst already be encoded and any Content-Transfer-Encoding header must already be present in hdr

Parameters

  data | the data for the part
  content_type | the content_type for the part
  disp | the Content-Disposition header (ex: `'inline'`, `'attachment`; filename="file.txt"')
  hdr | an optional hash of headers for the part

Exceptions

  PART-ERROR | empty content type argument passed

See Also
  - MultiPartMixedMessage::splicePart()
  - MultiPartMixedMessage::spliceEncodePart()
  - MultiPartMixedMessage::addEncodePart()

Mime::MultiPartMixedMessage::constructor | ( | string | boundary = `MultiPartMessage::getBoundary()` | ) |

creates the object

Parameters

  boundary | the boundary to use between parts

hash Mime::MultiPartMixedMessage::getMsgAndHeaders | ( |  | ) |

returns a hash of the message

Returns
  a hash of the message with the following keys:
  - `hdr:` a hash of header information
  - `msg:` a binary object of serialized message parts

Mime::MultiPartMixedMessage::spliceEncodePart | ( | data | data,
|  | string | enc,
|  | string | content_type = `MimeTypeText`,
|  | string | disp = `"inline"`,
|  | *hash | hdr
| ) |  |

adds a message part to the start of the list; encodes the data according to the transfer encoding argument passed

Parameters

  data | the unencoded data for the part
  enc | the transfer encoding to use for the part; see MIME Content Transfer Encoding Constants for possible values
  content_type | the content_type for the part
  disp | the Content-Disposition header (ex: `'inline'`, `'attachment`; filename="file.txt"')
  hdr | an optional hash of headers for the part

Exceptions

  MIME-TRANSFER-ENCODING-ERROR | unknown transfer encoding
  PART-ERROR | empty content type argument passed

See Also
  - MultiPartMixedMessage::splicePart()
  - MultiPartMixedMessage::addPart()
  - MultiPartMixedMessage::addEncodePart()

Mime::MultiPartMixedMessage::splicePart | ( | data | data,
|  | string | content_type = `MimeTypeText`,
|  | string | disp = `"inline"`,
|  | *hash | hdr
| ) |  |

adds a message part to the start of the list; the data muyst already be encoded and any Content-Transfer-Encoding header must already be present in hdr

Parameters

  data | the data for the part
  content_type | the content_type for the part
  disp | the Content-Disposition header (ex: `'inline'`, `'attachment`; filename="file.txt"')
  hdr | an optional hash of headers for the part

Exceptions

  PART-ERROR | empty content type argument passed

See Also
  - MultiPartMixedMessage::addPart()
  - MultiPartMixedMessage::spliceEncodePart()
  - MultiPartMixedMessage::addEncodePart()