147 list<hash<MessageInfo>>
part();
241 "7z":
"application/x-7z-compressed",
242 "ai":
"application/postscript",
243 "aif":
"audio/x-aiff",
244 "aifc":
"audio/x-aiff",
245 "aiff":
"audio/x-aiff",
247 "atom":
"application/atom+xml",
249 "avi":
"video/x-msvideo",
250 "bcpio":
"application/x-bcpio",
253 "bz2":
"application/x-bzip",
255 "cdf":
"application/x-netcdf",
258 "cpio":
"application/x-cpio",
260 "cpt":
"application/mac-compactpro",
261 "csh":
"application/x-csh",
264 "dcr":
"application/x-director",
266 "dir":
"application/x-director",
267 "djv":
"image/vnd.djvu",
268 "djvu":
"image/vnd.djvu",
272 "doc":
"application/msword",
273 "dtd":
"application/xml-dtd",
275 "dvi":
"application/x-dvi",
276 "dxr":
"application/x-director",
277 "eps":
"application/postscript",
278 "etx":
"text/x-setext",
280 "ez":
"application/andrew-inset",
282 "gram":
"application/srgs",
283 "grxml":
"application/srgs+xml",
284 "gtar":
"application/x-gtar",
285 "gz":
"application/x-gzip",
287 "hdf":
"application/x-hdf",
290 "hqx":
"application/mac-binhex40",
293 "ice":
"x-conference/x-cooltalk",
294 "ico":
"image/x-icon",
295 "ics":
"text/calendar",
297 "ifb":
"text/calendar",
298 "iges":
"model/iges",
300 "jar":
"application/java-archive",
302 "jnlp":
"application/x-java-jnlp-file",
310 "latex":
"application/x-latex",
313 "m3u":
"audio/x-mpegurl",
314 "m4a":
"audio/mp4a-latm",
315 "m4b":
"audio/mp4a-latm",
316 "m4p":
"audio/mp4a-latm",
317 "m4u":
"video/vnd.mpegurl",
318 "m4v":
"video/x-m4v",
319 "mac":
"image/x-macpaint",
320 "man":
"application/x-troff-man",
321 "mathml":
"application/mathml+xml",
322 "me":
"application/x-troff-me",
323 "mesh":
"model/mesh",
325 "midi":
"audio/midi",
326 "mif":
"application/vnd.mif",
327 "mov":
"video/quicktime",
328 "movie":
"video/x-sgi-movie",
333 "mpeg":
"video/mpeg",
335 "mpga":
"audio/mpeg",
336 "ms":
"application/x-troff-ms",
338 "mxu":
"video/vnd.mpegurl",
339 "nc":
"application/x-netcdf",
340 "oda":
"application/oda",
341 "ogg":
"application/ogg",
342 "pbm":
"image/x-portable-bitmap",
344 "pdb":
"chemical/x-pdb",
345 "pdf":
"application/pdf",
346 "pgm":
"image/x-portable-graymap",
347 "pgn":
"application/x-chess-pgn",
349 "pict":
"image/pict",
351 "pnm":
"image/x-portable-anymap",
352 "pnt":
"image/x-macpaint",
353 "pntg":
"image/x-macpaint",
354 "ppm":
"image/x-portable-pixmap",
355 "ppt":
"application/vnd.ms-powerpoint",
356 "ps":
"application/postscript",
388 "qt":
"video/quicktime",
389 "qti":
"image/x-quicktime",
390 "qtif":
"image/x-quicktime",
391 "ra":
"audio/x-pn-realaudio",
392 "ram":
"audio/x-pn-realaudio",
393 "ras":
"image/x-cmu-raster",
394 "rdf":
"application/rdf+xml",
395 "rgb":
"image/x-rgb",
396 "rm":
"application/vnd.rn-realmedia",
397 "roff":
"application/x-troff",
399 "rtx":
"text/richtext",
402 "sh":
"application/x-sh",
403 "shar":
"application/x-shar",
404 "silo":
"model/mesh",
405 "sit":
"application/x-stuffit",
406 "skd":
"application/x-koan",
407 "skm":
"application/x-koan",
408 "skp":
"application/x-koan",
409 "skt":
"application/x-koan",
410 "smi":
"application/smil",
411 "smil":
"application/smil",
412 "snd":
"audio/basic",
414 "spl":
"application/x-futuresplash",
415 "src":
"application/x-wais-source",
416 "sv4cpio":
"application/x-sv4cpio",
417 "sv4crc":
"application/x-sv4crc",
418 "svg":
"image/svg+xml",
419 "swf":
"application/x-shockwave-flash",
420 "t":
"application/x-troff",
421 "tar":
"application/x-tar",
422 "tar.bz2":
"application/x-bzip-compressed-tar",
423 "tar.gz":
"application/x-tar-gz",
424 "tbz":
"application/x-bzip-compressed-tar",
425 "tcl":
"application/x-tcl",
426 "tex":
"application/x-tex",
427 "texi":
"application/x-texinfo",
428 "texinfo":
"application/x-texinfo",
430 "tgz":
"application/x-tar-gz",
432 "tiff":
"image/tiff",
433 "tr":
"application/x-troff",
434 "tsv":
"text/tab-separated-values",
436 "ustar":
"application/x-ustar",
437 "vcd":
"application/x-cdlink",
438 "vrml":
"model/vrml",
439 "vxml":
"application/voicexml+xml",
440 "wav":
"audio/x-wav",
441 "wbmp":
"image/vnd.wap.wbmp",
442 "wbmxl":
"application/vnd.wap.wbxml",
443 "wml":
"text/vnd.wap.wml",
444 "wmlc":
"application/vnd.wap.wmlc",
445 "wmls":
"text/vnd.wap.wmlscript",
446 "wmlsc":
"application/vnd.wap.wmlscriptc",
448 "wsdl":
"application/wsdl+xml",
449 "xbm":
"image/x-xbitmap",
450 "xht":
"application/xhtml+xml",
451 "xhtml":
"application/xhtml+xml",
452 "xls":
"application/vnd.ms-excel",
454 "xpm":
"image/x-xpixmap",
456 "xsl":
"application/xml",
457 "xslt":
"application/xslt+xml",
458 "xul":
"application/vnd.mozilla.xul+xml",
459 "xwd":
"image/x-xwindowdump",
460 "xyz":
"chemical/x-xyz",
462 "zip":
"application/zip",
707 const MP_DEFAULT_MSG =
"This is a MIME multipart message";
721 list<hash<MessagePartInfo>> l();
838 static hash<MessageInfo>
parseBody(
string boundary,
string body,
bool decode =
True);
851 final hash<MessageInfo> getMsgAndHeadersIntern(*
string content_type,
bool conlen =
True);
858 splicePartIntern(data mime_data,
hash hdr);
865 addPartIntern(data mime_data,
hash hdr);
871 static hash<MessagePartInfo> getPart(data mime_data,
hash hdr);
903 splicePart(data mime_data,
string id,
string content_type, *
hash hdr);
914 addPart(data mime_data,
string id,
string content_type, *
hash hdr);
1050 splicePart(data mime_data,
string name,
string filename,
string content_type, *
hash hdr);
1080 addPart(data mime_data,
string name,
string filename,
string content_type, *
hash hdr);
1088 addPart(hash<FormDataMessageInfo> h);
1109 static hash<string, hash<FormDataMessageInfo>>
parseMessage(
string content,
string body);
const UrlEncodedChars
hash of non-alphanumeric characters that can be used unencoded in URL encoded format ...
Definition: Mime.qm.dox.h:472
abstract hash< MessageInfo > getMsgAndHeaders()
returns a hash of the message
const MPT_RELATED
for sending multiple components of an aggregated whole (http://tools.ietf.org/html/rfc2387) ...
Definition: Mime.qm.dox.h:691
const MimeTypeJpeg
MIME type for jpeg images.
Definition: Mime.qm.dox.h:190
constructor(string boundary=MultiPartMessage::getBoundary())
creates the object
data data
part body data
Definition: Mime.qm.dox.h:153
const MPT_MESSAGE
for email/MIME messages with headers (http://tools.ietf.org/html/rfc2046)
Definition: Mime.qm.dox.h:682
string getBoundary()
returns the message boundary string used
constructor(string mptype, string boundary=MultiPartMessage::getBoundary())
creates the object
spliceEncodePart(data mime_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 arg...
string mime_encode_header_word_q(string str)
returns a string in "Q" ("quoted-printable") encoding for MIME header string words according to RFC 2...
const ContentTransEnc8Bit
implies lines < 1000 chars (= no encoding)
Definition: Mime.qm.dox.h:493
MultiPartMessage class implementation.
Definition: Mime.qm.dox.h:704
const MimeTypeYaml
Mime type for yaml data files.
Definition: Mime.qm.dox.h:199
static hash< MessageInfo > parseBody(string boundary, string body, bool decode=True)
returns a hash representing a parsed multipart message body from a boundary string and body arguments...
const MimeTypeXml
Mime type for plain (human-readable) xml files.
Definition: Mime.qm.dox.h:202
const MPT_ENCRYPTED
for sending encrypted messages (http://tools.ietf.org/html/rfc1847#section-2.2)
Definition: Mime.qm.dox.h:697
string mime_encode_quoted_printable(string str, bool hdr=False)
returns a string in "quoted-printable" (or "QP") encoding according to RFC 2045 section 6...
static binary serializeHeaders(hash hdr)
serializes a header hash to a binary object
string mime_get_form_urlencoded_string(hash h)
returns a string in MIME multipart form URL encoded format (for use with "Content-Type: application/x...
implements the MultiPartMixedMessage class, a specialization of MultiPartMessage
Definition: Mime.qm.dox.h:927
const MimeTypeMultipartFormData
Mime type for multipart form data.
Definition: Mime.qm.dox.h:229
const MPT_ALTERNATIVE
for sending multiple "alternatives" of the same content (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:688
hash hdr
part header hash
Definition: Mime.qm.dox.h:155
string mime_get_urlencoded_string(auto val)
returns a single string in MIME URL encoded format
const MimeTypeJsonRpc
Mime type for JSON-RPC.
Definition: Mime.qm.dox.h:211
const MPT_BYTERANGES
for sending noncontiguous byte ranges of a single message (http://tools.ietf.org/html/rfc2616) ...
Definition: Mime.qm.dox.h:700
const MimeTypeJson
Mime type for JSON.
Definition: Mime.qm.dox.h:208
const MPT_SIGNED
to attach a digital signature to a message (http://tools.ietf.org/html/rfc1847#section-2.1)
Definition: Mime.qm.dox.h:694
const ContentTransEncBase64
base-64 Content-Transfer-Encoding
Definition: Mime.qm.dox.h:499
binary serialize()
serializes the message with the Content-Type header first and returns a binary object ready to send o...
const MimeTypePng
MIME type for png images.
Definition: Mime.qm.dox.h:193
const MimeQuotedPrintableLineLen
maximum line length for quoted-printable encoding
Definition: Mime.qm.dox.h:512
const MimeTypeJavascript
Mime type for Javascript.
Definition: Mime.qm.dox.h:220
const MimeTypeUnknown
MIME type for unknown file types.
Definition: Mime.qm.dox.h:175
hash hdr
message or part headers
Definition: Mime.qm.dox.h:143
string mime_decode_base64_to_string(data str, *string encoding)
returns a string value from a string in "BASE64" encoding according to RFC 2045
const MimeTypeOctetStream
MIME type for unknown file types.
Definition: Mime.qm.dox.h:178
const MimeTypeCss
Mime type for css.
Definition: Mime.qm.dox.h:223
const MimeTypeFormUrlEncoded
Mime type for multipart form URL encoding.
Definition: Mime.qm.dox.h:226
string mime_decode_header(string hdr)
decodes a header string; if any part of the string is encoded with "B" ("BASE64") or "Q" ("quoted-pri...
const MimeTypeMultipartMixed
Mime type for multipart mixed.
Definition: Mime.qm.dox.h:235
binary mime_decode_base64(data str)
returns a binary value from a string in "BASE64" encoding according to RFC 2045
const MimeTypeYamlRpc
Mime type for YAML-RPC.
Definition: Mime.qm.dox.h:217
string mime_decode_urlencoded_string(string str)
decodes the given string from URL encoded format
hash< MessageInfo > getMsgAndHeaders()
returns a hash of the message
const MimeTypeXmlRpc
Mime type for XML-RPC.
Definition: Mime.qm.dox.h:214
addEncodePart(data mime_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 argum...
splicePart(data mime_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-Trans...
string get_mime_type_from_ext(string path)
returns the mime type for the given filename from the extension or Mime::MimeTypeUnknown if the exten...
message and part info hash
Definition: Mime.qm.dox.h:141
data body
the data for the message or part
Definition: Mime.qm.dox.h:145
const MPT_MIXED
for sending files with different "Content-Type" headers (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:679
string mime_encode_base64(data str, int len=MimeBase64LineLen)
returns a string in "BASE64" encoding according to RFC 2045
binary serializeBody()
serializes the message body only and returns a binary object ready to send over a socket ...
message part hash
Definition: Mime.qm.dox.h:151
data mime_encode_transfer_data(data mime_data, string enc)
encodes data according to the given encoding
const MPT_DIGEST
for sending multiple text messages (http://tools.ietf.org/html/rfc2046#section-5.1.5)
Definition: Mime.qm.dox.h:685
const MPT_FORM_DATA
for form data (http://tools.ietf.org/html/rfc1867, http://tools.ietf.org/html/rfc2388) ...
Definition: Mime.qm.dox.h:676
const ContentTransEncQuotedPrintable
quoted-printable Content-Transfer-Encoding
Definition: Mime.qm.dox.h:502
int size()
returns the number of parts in the message
string mime_encode_header_word_b(string str)
returns a string in "B" ("BASE64") encoding for MIME header string words according to RFC 2047 ...
static string getRandomString(int len)
returns a string of random characters
const MimeBase64LineLen
maximum line length for base64 encoding
Definition: Mime.qm.dox.h:507
const MimeTypeHtml
MIME type for HTML.
Definition: Mime.qm.dox.h:184
const MimeTypes
A map of default mime types per file extension; the hash keys are file extensions in lower-case witho...
Definition: Mime.qm.dox.h:240
data mime_decode_transfer_data(data mime_data, string enc, *string ct)
decodes data according to the given encoding
const MimeTypeSoapXml
Mime type for SOAP XML messages (XML MIME type reference: http://tools.ietf.org/html/rfc3023) ...
Definition: Mime.qm.dox.h:196
const ContentTransEncBinary
binary transfer encoding; implies no maximum line length (= no encoding)
Definition: Mime.qm.dox.h:496
const MimeTypeMultipartRelated
Mime type for multipart related.
Definition: Mime.qm.dox.h:232
addPart(data mime_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-Transfe...
const MimeTypeXmlApp
Mime type for more complicated (not human-readable) xml files.
Definition: Mime.qm.dox.h:205
const ContentTransEnc7Bit
default Content-Transfer-Encoding if none is present; implies lines < 1000 chars (= no encoding) ...
Definition: Mime.qm.dox.h:490
const MimeTypeCsv
MIME type for csv files (http://tools.ietf.org/html/rfc4180)
Definition: Mime.qm.dox.h:187
hash< auto > mime_parse_form_urlencoded_string(string str)
returns a hash corresponding to the string in MIME multipart form URL encoded format (for use with "C...
const MimeTypeText
MIME type for text.
Definition: Mime.qm.dox.h:181
list< hash< MessageInfo > > part()
parts of the message or subparts of the part
string mime_decode_quoted_printable(string str, *string encoding)
returns a string parsed from "quoted-printable" (or "QP") encoding according to RFC 2045 section 6...