Loading...
Searching...
No Matches
MIME Encoding Functions

## Functions

string | Mime::mime_encode_base64 (data str, int len=MimeBase64LineLen)
string | Mime::mime_encode_header_word_b (string str)
| returns a string in "B" ("BASE64") encoding for MIME header string words
string | Mime::mime_encode_header_word_q (string str)
| returns a string in "Q" ("quoted-printable") encoding for MIME header string words
string | Mime::mime_encode_quoted_printable (string str, bool hdr=False, *string encoding)
| returns a string in "quoted-printable" (or "QP") encoding
data | Mime::mime_encode_transfer_data (data mime_data, string enc)
| encodes data according to the given encoding

## Detailed Description

## Function Documentation

## mime_encode_base64()

string Mime::mime_encode_base64 | ( | data | str,
|  | int | len = MimeBase64LineLen )

returns a string in "BASE64" encoding according to RFC 2045

Parameters

  str | the string to encode
  len | the maximum line length

Note
  this function is basically just a wrapper for the standard Qore function make_base64_string()

## mime_encode_header_word_b()

string Mime::mime_encode_header_word_b | ( | string | str | ) |

returns a string in "B" ("BASE64") encoding for MIME header string words

According to RFC 2047

## mime_encode_header_word_q()

string Mime::mime_encode_header_word_q | ( | string | str | ) |

returns a string in "Q" ("quoted-printable") encoding for MIME header string words

According to RFC 2047

## mime_encode_quoted_printable()

string Mime::mime_encode_quoted_printable | ( | string | str,
|  | bool | hdr = False,
|  | *string | encoding )

returns a string in "quoted-printable" (or "QP") encoding

According to RFC 2045 section 6.7

Parameters

  str | the string to encode
  hdr | use rules for a MIME header (RFC 2047)

## mime_encode_transfer_data()

data Mime::mime_encode_transfer_data | ( | data | mime_data,
|  | string | enc )

encodes data according to the given encoding

Parameters

  mime_data | the data to encode
  enc | the encoding to use; see MIME Content Transfer Encoding Constants for possible values (case is ignored)

Exceptions

  MIME-TRANSFER-ENCODING-ERROR | unknown transfer encoding