Qore Mime Module Reference  1.4.2
MIME Encoding Functions

Functions

string Mime::mime_encode_base64 (data str, int len=MimeBase64LineLen)
 returns a string in "BASE64" encoding according to RFC 2045 More...
 
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
 
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
 
string Mime::mime_encode_quoted_printable (string str, bool hdr=False)
 returns a string in "quoted-printable" (or "QP") encoding according to RFC 2045 section 6.7 More...
 
data Mime::mime_encode_transfer_data (data mime_data, string enc)
 encodes data according to the given encoding More...
 

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
strthe string to encode
lenthe maximum line length
Note
this function is basically just a wrapper for the standard Qore function make_base64_string()

◆ mime_encode_quoted_printable()

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

returns a string in "quoted-printable" (or "QP") encoding according to RFC 2045 section 6.7

Parameters
strthe string to encode
hdruse 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_datathe data to encode
encthe encoding to use; see MIME Content Transfer Encoding Constants for possible values (case is ignored)
Exceptions
MIME-TRANSFER-ENCODING-ERRORunknown transfer encoding