142 list<hash<MessageInfo>>
part();
236 "7z":
"application/x-7z-compressed",
237 "ai":
"application/postscript",
238 "aif":
"audio/x-aiff",
239 "aifc":
"audio/x-aiff",
240 "aiff":
"audio/x-aiff",
242 "atom":
"application/atom+xml",
244 "avi":
"video/x-msvideo",
245 "bcpio":
"application/x-bcpio",
248 "bz2":
"application/x-bzip",
250 "cdf":
"application/x-netcdf",
253 "cpio":
"application/x-cpio",
255 "cpt":
"application/mac-compactpro",
256 "csh":
"application/x-csh",
259 "dcr":
"application/x-director",
261 "dir":
"application/x-director",
262 "djv":
"image/vnd.djvu",
263 "djvu":
"image/vnd.djvu",
267 "doc":
"application/msword",
268 "dtd":
"application/xml-dtd",
270 "dvi":
"application/x-dvi",
271 "dxr":
"application/x-director",
272 "eps":
"application/postscript",
273 "etx":
"text/x-setext",
275 "ez":
"application/andrew-inset",
277 "gram":
"application/srgs",
278 "grxml":
"application/srgs+xml",
279 "gtar":
"application/x-gtar",
280 "gz":
"application/x-gzip",
282 "hdf":
"application/x-hdf",
285 "hqx":
"application/mac-binhex40",
288 "ice":
"x-conference/x-cooltalk",
289 "ico":
"image/x-icon",
290 "ics":
"text/calendar",
292 "ifb":
"text/calendar",
293 "iges":
"model/iges",
295 "jar":
"application/java-archive",
297 "jnlp":
"application/x-java-jnlp-file",
305 "latex":
"application/x-latex",
308 "m3u":
"audio/x-mpegurl",
309 "m4a":
"audio/mp4a-latm",
310 "m4b":
"audio/mp4a-latm",
311 "m4p":
"audio/mp4a-latm",
312 "m4u":
"video/vnd.mpegurl",
313 "m4v":
"video/x-m4v",
314 "mac":
"image/x-macpaint",
315 "man":
"application/x-troff-man",
316 "mathml":
"application/mathml+xml",
317 "me":
"application/x-troff-me",
318 "mesh":
"model/mesh",
320 "midi":
"audio/midi",
321 "mif":
"application/vnd.mif",
322 "mov":
"video/quicktime",
323 "movie":
"video/x-sgi-movie",
328 "mpeg":
"video/mpeg",
330 "mpga":
"audio/mpeg",
331 "ms":
"application/x-troff-ms",
333 "mxu":
"video/vnd.mpegurl",
334 "nc":
"application/x-netcdf",
335 "oda":
"application/oda",
336 "ogg":
"application/ogg",
337 "pbm":
"image/x-portable-bitmap",
339 "pdb":
"chemical/x-pdb",
340 "pdf":
"application/pdf",
341 "pgm":
"image/x-portable-graymap",
342 "pgn":
"application/x-chess-pgn",
344 "pict":
"image/pict",
346 "pnm":
"image/x-portable-anymap",
347 "pnt":
"image/x-macpaint",
348 "pntg":
"image/x-macpaint",
349 "ppm":
"image/x-portable-pixmap",
350 "ppt":
"application/vnd.ms-powerpoint",
351 "ps":
"application/postscript",
383 "qt":
"video/quicktime",
384 "qti":
"image/x-quicktime",
385 "qtif":
"image/x-quicktime",
386 "ra":
"audio/x-pn-realaudio",
387 "ram":
"audio/x-pn-realaudio",
388 "ras":
"image/x-cmu-raster",
389 "rdf":
"application/rdf+xml",
390 "rgb":
"image/x-rgb",
391 "rm":
"application/vnd.rn-realmedia",
392 "roff":
"application/x-troff",
394 "rtx":
"text/richtext",
397 "sh":
"application/x-sh",
398 "shar":
"application/x-shar",
399 "silo":
"model/mesh",
400 "sit":
"application/x-stuffit",
401 "skd":
"application/x-koan",
402 "skm":
"application/x-koan",
403 "skp":
"application/x-koan",
404 "skt":
"application/x-koan",
405 "smi":
"application/smil",
406 "smil":
"application/smil",
407 "snd":
"audio/basic",
409 "spl":
"application/x-futuresplash",
410 "src":
"application/x-wais-source",
411 "sv4cpio":
"application/x-sv4cpio",
412 "sv4crc":
"application/x-sv4crc",
413 "svg":
"image/svg+xml",
414 "swf":
"application/x-shockwave-flash",
415 "t":
"application/x-troff",
416 "tar":
"application/x-tar",
417 "tar.bz2":
"application/x-bzip-compressed-tar",
418 "tar.gz":
"application/x-tar-gz",
419 "tbz":
"application/x-bzip-compressed-tar",
420 "tcl":
"application/x-tcl",
421 "tex":
"application/x-tex",
422 "texi":
"application/x-texinfo",
423 "texinfo":
"application/x-texinfo",
425 "tgz":
"application/x-tar-gz",
427 "tiff":
"image/tiff",
428 "tr":
"application/x-troff",
429 "tsv":
"text/tab-separated-values",
431 "ustar":
"application/x-ustar",
432 "vcd":
"application/x-cdlink",
433 "vrml":
"model/vrml",
434 "vxml":
"application/voicexml+xml",
435 "wav":
"audio/x-wav",
436 "wbmp":
"image/vnd.wap.wbmp",
437 "wbmxl":
"application/vnd.wap.wbxml",
438 "wml":
"text/vnd.wap.wml",
439 "wmlc":
"application/vnd.wap.wmlc",
440 "wmls":
"text/vnd.wap.wmlscript",
441 "wmlsc":
"application/vnd.wap.wmlscriptc",
443 "wsdl":
"application/wsdl+xml",
444 "xbm":
"image/x-xbitmap",
445 "xht":
"application/xhtml+xml",
446 "xhtml":
"application/xhtml+xml",
447 "xls":
"application/vnd.ms-excel",
449 "xpm":
"image/x-xpixmap",
451 "xsl":
"application/xml",
452 "xslt":
"application/xslt+xml",
453 "xul":
"application/vnd.mozilla.xul+xml",
454 "xwd":
"image/x-xwindowdump",
455 "xyz":
"chemical/x-xyz",
457 "zip":
"application/zip",
701 const MP_DEFAULT_MSG =
"This is a MIME multipart message";
715 list<hash<MessagePartInfo>> l();
753 string getBoundary();
764 static string getBoundary();
771 static string getRandomString(
int len);
832 static hash<MessageInfo> parseBody(
string boundary,
string body,
bool decode =
True);
839 abstract hash<MessageInfo> getMsgAndHeaders();
845 final hash<MessageInfo> getMsgAndHeadersIntern(*
string content_type,
bool conlen =
True);
852 splicePartIntern(data mime_data,
hash hdr);
859 addPartIntern(data mime_data,
hash hdr);
865 static hash<MessagePartInfo> getPart(data mime_data,
hash hdr);
897 splicePart(data mime_data,
string id,
string content_type, *
hash hdr);
908 addPart(data mime_data,
string id,
string content_type, *
hash hdr);
916 hash<MessageInfo> getMsgAndHeaders();
943 splicePart(data mime_data,
string content_type =
MimeTypeText,
string disp =
"inline", *
hash hdr);
959 addPart(data mime_data,
string content_type =
MimeTypeText,
string disp =
"inline", *
hash hdr);
977 spliceEncodePart(data mime_data,
string enc,
string content_type =
MimeTypeText,
string disp =
"inline", *
hash hdr);
995 addEncodePart(data mime_data,
string enc,
string content_type =
MimeTypeText,
string disp =
"inline", *
hash hdr);
1003 hash<MessageInfo> getMsgAndHeaders();
1032 splicePart(data mime_data,
string name, *
hash hdr);
1044 splicePart(data mime_data,
string name,
string filename,
string content_type, *
hash hdr);
1052 splicePart(hash<FormDataMessageInfo> h);
1062 addPart(data mime_data,
string name, *
hash hdr);
1074 addPart(data mime_data,
string name,
string filename,
string content_type, *
hash hdr);
1082 addPart(hash<FormDataMessageInfo> h);
1090 hash<MessageInfo> getMsgAndHeaders();
1103 static hash<string, hash<FormDataMessageInfo>> parseMessage(
string content,
string body);
1117 static binary makeMessageBody(
hash<
string, hash<FormDataMessageInfo>> parts);
1122 checkPartName(
string name);
1129 hash getPartHeader(
string name, *
string filename, *
string content_type, *
hash hdr);
const UrlEncodedChars
hash of non-alphanumeric characters that can be used unencoded in URL encoded format ...
Definition: Mime.qm.dox.h:467
const MPT_RELATED
for sending multiple components of an aggregated whole (http://tools.ietf.org/html/rfc2387) ...
Definition: Mime.qm.dox.h:685
const MimeTypeJpeg
MIME type for jpeg images.
Definition: Mime.qm.dox.h:185
data data
part body data
Definition: Mime.qm.dox.h:148
const MPT_MESSAGE
for email/MIME messages with headers (http://tools.ietf.org/html/rfc2046)
Definition: Mime.qm.dox.h:676
string getBoundary()
returns the message boundary string used
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:488
MultiPartMessage class implementation.
Definition: Mime.qm.dox.h:698
const MimeTypeYaml
Mime type for yaml data files.
Definition: Mime.qm.dox.h:194
const MimeTypeXml
Mime type for plain (human-readable) xml files.
Definition: Mime.qm.dox.h:197
const MPT_ENCRYPTED
for sending encrypted messages (http://tools.ietf.org/html/rfc1847#section-2.2)
Definition: Mime.qm.dox.h:691
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...
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:921
const MimeTypeMultipartFormData
Mime type for multipart form data.
Definition: Mime.qm.dox.h:224
const MPT_ALTERNATIVE
for sending multiple "alternatives" of the same content (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:682
hash hdr
part header hash
Definition: Mime.qm.dox.h:150
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:206
const MPT_BYTERANGES
for sending noncontiguous byte ranges of a single message (http://tools.ietf.org/html/rfc2616) ...
Definition: Mime.qm.dox.h:694
const MimeTypeJson
Mime type for JSON.
Definition: Mime.qm.dox.h:203
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:688
const ContentTransEncBase64
base-64 Content-Transfer-Encoding
Definition: Mime.qm.dox.h:494
const MimeTypePng
MIME type for png images.
Definition: Mime.qm.dox.h:188
const MimeQuotedPrintableLineLen
maximum line length for quoted-printable encoding
Definition: Mime.qm.dox.h:507
const MimeTypeJavascript
Mime type for Javascript.
Definition: Mime.qm.dox.h:215
const MimeTypeUnknown
MIME type for unknown file types.
Definition: Mime.qm.dox.h:170
hash hdr
message or part headers
Definition: Mime.qm.dox.h:138
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:173
const MimeTypeCss
Mime type for css.
Definition: Mime.qm.dox.h:218
const MimeTypeFormUrlEncoded
Mime type for multipart form URL encoding.
Definition: Mime.qm.dox.h:221
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...
hash 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 MimeTypeMultipartMixed
Mime type for multipart mixed.
Definition: Mime.qm.dox.h:230
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:212
string mime_decode_urlencoded_string(string str)
decodes the given string from URL encoded format
const MimeTypeXmlRpc
Mime type for XML-RPC.
Definition: Mime.qm.dox.h:209
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:136
data body
the data for the message or part
Definition: Mime.qm.dox.h:140
const MPT_MIXED
for sending files with different "Content-Type" headers (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:673
string mime_encode_base64(data str, int len=MimeBase64LineLen)
returns a string in "BASE64" encoding according to RFC 2045
message part hash
Definition: Mime.qm.dox.h:146
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:679
const MPT_FORM_DATA
for form data (http://tools.ietf.org/html/rfc1867, http://tools.ietf.org/html/rfc2388) ...
Definition: Mime.qm.dox.h:670
const ContentTransEncQuotedPrintable
quoted-printable Content-Transfer-Encoding
Definition: Mime.qm.dox.h:497
string mime_encode_header_word_b(string str)
returns a string in "B" ("BASE64") encoding for MIME header string words according to RFC 2047 ...
public Mime namespace defines constants and functions relevant to MIME
Definition: Mime.qm.dox.h:132
const MimeBase64LineLen
maximum line length for base64 encoding
Definition: Mime.qm.dox.h:502
const MimeTypeHtml
MIME type for HTML.
Definition: Mime.qm.dox.h:179
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:235
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:191
const ContentTransEncBinary
binary transfer encoding; implies no maximum line length (= no encoding)
Definition: Mime.qm.dox.h:491
const MimeTypeMultipartRelated
Mime type for multipart related.
Definition: Mime.qm.dox.h:227
const MimeTypeXmlApp
Mime type for more complicated (not human-readable) xml files.
Definition: Mime.qm.dox.h:200
const ContentTransEnc7Bit
default Content-Transfer-Encoding if none is present; implies lines < 1000 chars (= no encoding) ...
Definition: Mime.qm.dox.h:485
const MimeTypeCsv
MIME type for csv files (http://tools.ietf.org/html/rfc4180)
Definition: Mime.qm.dox.h:182
const MimeTypeText
MIME type for text.
Definition: Mime.qm.dox.h:176
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...