Qore Mime Module Reference  1.4
Mime.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
2 // @file Mime.qm Mime module definition
3 
4 /* Mime.qm Copyright (C) 2012 - 2017 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // minimum required Qore version
26 
27 
28 // assume local var scope, do not use "$" for vars, members, and method calls
29 
30 
131 namespace Mime {
134 
136  public struct MessageInfo {
140  data body;
142  list<hash<MessageInfo>> part();
143  };
144 
146  public struct MessagePartInfo {
148  data data;
151  };
152 
154  public struct FormDataMessageInfo {
156  string name;
158  *string filename;
162  data body;
163  };
164 
171 
173  const MimeTypeOctetStream = "application/octet-stream";
174 
176  const MimeTypeText = "text/plain";
177 
179  const MimeTypeHtml = "text/html";
180 
182  const MimeTypeCsv = "text/csv";
183 
185  const MimeTypeJpeg = "image/jpeg";
186 
188  const MimeTypePng = "image/png";
189 
191  const MimeTypeSoapXml = "application/soap+xml";
192 
194  const MimeTypeYaml = "text/x-yaml";
195 
197  const MimeTypeXml = "text/xml";
198 
200  const MimeTypeXmlApp = "application/xml";
201 
203  const MimeTypeJson = "application/json";
204 
207 
210 
212  const MimeTypeYamlRpc = "application/x-yaml";
213 
215  const MimeTypeJavascript = "application/javascript";
216 
218  const MimeTypeCss = "text/css";
219 
221  const MimeTypeFormUrlEncoded = "application/x-www-form-urlencoded";
222 
224  const MimeTypeMultipartFormData = "multipart/form-data";
225 
227  const MimeTypeMultipartRelated = "multipart/related";
228 
230  const MimeTypeMultipartMixed = "multipart/mixed";
231 
233 
235  const MimeTypes = (
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",
241  "asc": MimeTypeText,
242  "atom": "application/atom+xml",
243  "au": "audio/basic",
244  "avi": "video/x-msvideo",
245  "bcpio": "application/x-bcpio",
246  "bin": MimeTypeUnknown,
247  "bmp": "image/bmp",
248  "bz2": "application/x-bzip",
249  "cc": MimeTypeText,
250  "cdf": "application/x-netcdf",
251  "cgm": "image/cgm",
252  "class": MimeTypeUnknown,
253  "cpio": "application/x-cpio",
254  "cpp": MimeTypeText,
255  "cpt": "application/mac-compactpro",
256  "csh": "application/x-csh",
257  "css": MimeTypeCss,
258  "csv": MimeTypeCsv,
259  "dcr": "application/x-director",
260  "dif": "video/x-dv",
261  "dir": "application/x-director",
262  "djv": "image/vnd.djvu",
263  "djvu": "image/vnd.djvu",
264  "dll": MimeTypeUnknown,
265  "dmg": MimeTypeUnknown,
266  "dms": MimeTypeUnknown,
267  "doc": "application/msword",
268  "dtd": "application/xml-dtd",
269  "dv": "video/x-dv",
270  "dvi": "application/x-dvi",
271  "dxr": "application/x-director",
272  "eps": "application/postscript",
273  "etx": "text/x-setext",
274  "exe": MimeTypeUnknown,
275  "ez": "application/andrew-inset",
276  "gif": "image/gif",
277  "gram": "application/srgs",
278  "grxml": "application/srgs+xml",
279  "gtar": "application/x-gtar",
280  "gz": "application/x-gzip",
281  "h": MimeTypeText,
282  "hdf": "application/x-hdf",
283  "hh": MimeTypeText,
284  "hpp": MimeTypeText,
285  "hqx": "application/mac-binhex40",
286  "htm": MimeTypeHtml,
287  "html": MimeTypeHtml,
288  "ice": "x-conference/x-cooltalk",
289  "ico": "image/x-icon",
290  "ics": "text/calendar",
291  "ief": "image/ief",
292  "ifb": "text/calendar",
293  "iges": "model/iges",
294  "igs": "model/iges",
295  "jar": "application/java-archive",
296  "java": MimeTypeText,
297  "jnlp": "application/x-java-jnlp-file",
298  "jp2": "image/jp2",
299  "jpe": MimeTypeJpeg,
300  "jpeg": MimeTypeJpeg,
301  "jpg": MimeTypeJpeg,
302  "js": MimeTypeJavascript,
303  "json": MimeTypeJson,
304  "kar": "audio/midi",
305  "latex": "application/x-latex",
306  "lha": MimeTypeUnknown,
307  "lzh": MimeTypeUnknown,
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",
319  "mid": "audio/midi",
320  "midi": "audio/midi",
321  "mif": "application/vnd.mif",
322  "mov": "video/quicktime",
323  "movie": "video/x-sgi-movie",
324  "mp2": "audio/mpeg",
325  "mp3": "audio/mpeg",
326  "mp4": "video/mp4",
327  "mpe": "video/mpeg",
328  "mpeg": "video/mpeg",
329  "mpg": "video/mpeg",
330  "mpga": "audio/mpeg",
331  "ms": "application/x-troff-ms",
332  "msh": "model/mesh",
333  "mxu": "video/vnd.mpegurl",
334  "nc": "application/x-netcdf",
335  "oda": "application/oda",
336  "ogg": "application/ogg",
337  "pbm": "image/x-portable-bitmap",
338  "pct": "image/pict",
339  "pdb": "chemical/x-pdb",
340  "pdf": "application/pdf",
341  "pgm": "image/x-portable-graymap",
342  "pgn": "application/x-chess-pgn",
343  "pic": "image/pict",
344  "pict": "image/pict",
345  "png": MimeTypePng,
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",
352 
353  // Qore script
354  "q": MimeTypeText,
355 
356  // Qore class include file
357  "qc": MimeTypeText,
358 
359  // Qorus function definition file
360  "qfd": MimeTypeText,
361 
362  // Qorus class definition file
363  "qclass": MimeTypeText,
364 
365  // Qorus constant definition file
366  "qconst": MimeTypeText,
367 
368  // Qorus job definition
369  "qjob": MimeTypeText,
370 
371  // Qore include file
372  "ql": MimeTypeText,
373 
374  // Qore user module source
375  "qm": MimeTypeText,
376 
377  // Qorus service definition
378  "qsd": MimeTypeText,
379 
380  // Qorus workflow definition
381  "qwf": MimeTypeText,
382 
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",
393  "rtf": "text/rtf",
394  "rtx": "text/richtext",
395  "sgm": "text/sgml",
396  "sgml": "text/sgml",
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",
408  "so": MimeTypeUnknown,
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",
424  "text": MimeTypeText,
425  "tgz": "application/x-tar-gz",
426  "tif": "image/tiff",
427  "tiff": "image/tiff",
428  "tr": "application/x-troff",
429  "tsv": "text/tab-separated-values",
430  "txt": MimeTypeText,
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",
442  "wrl": "model/vrml",
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",
448  "xml": MimeTypeXml,
449  "xpm": "image/x-xpixmap",
450  "xsd": MimeTypeXml,
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",
456  "yaml": MimeTypeYaml,
457  "zip": "application/zip",
458  );
459 
461 
467  const UrlEncodedChars = (
468  "\$": True,
469  "-": True,
470  "_": True,
471  ".": True,
472  "!": True,
473  "*": True,
474  "'": True,
475  "(": True,
476  ")": True,
477  ",": True
478  );
480 
484  const ContentTransEnc7Bit = "7bit";
486 
488  const ContentTransEnc8Bit = "8bit";
489 
491  const ContentTransEncBinary = "binary";
492 
494  const ContentTransEncBase64 = "base64";
495 
497  const ContentTransEncQuotedPrintable = "quoted-printable";
498 
500 
502  const MimeBase64LineLen = 76;
503 
505 
509 
513 
519  string mime_encode_base64(data str, int len = MimeBase64LineLen);
520 
521 
523 
526  string mime_encode_quoted_printable(string str, bool hdr = False);
527 
528 
530 
535  data mime_encode_transfer_data(data mime_data, string enc);
536 
537 
539  string mime_encode_header_word_b(string str);
540 
541 
543  string mime_encode_header_word_q(string str);
544 
546 
550 
555  binary mime_decode_base64(data str);
556 
557 
559 
564  string mime_decode_base64_to_string(data str, *string encoding);
565 
566 
568 
573  string mime_decode_quoted_printable(string str, *string encoding);
574 
575 
577 
583  data mime_decode_transfer_data(data mime_data, string enc, *string ct);
584 
585 
587 
590  string mime_decode_header(string hdr);
591 
593 
597  string get_mime_type_from_ext(string path);
599 
600 
602 
617  string mime_get_urlencoded_string(auto val);
618 
619 
621 
636 
637 
639 
648  string mime_decode_urlencoded_string(string str);
649 
650 
652 
663 
665 
669  const MPT_FORM_DATA = "form-data";
671 
673  const MPT_MIXED = "mixed";
674 
676  const MPT_MESSAGE = "message";
677 
679  const MPT_DIGEST = "digest";
680 
682  const MPT_ALTERNATIVE = "alternative";
683 
685  const MPT_RELATED = "related";
686 
688  const MPT_SIGNED = "signed";
689 
691  const MPT_ENCRYPTED = "encrypted";
692 
694  const MPT_BYTERANGES = "byteranges";
696 
699 
700 public:
701  const MP_DEFAULT_MSG = "This is a MIME multipart message";
702 
704  private :
706  string mptype;
707 
709  string boundary;
710 
712  string ct;
713 
715  list<hash<MessagePartInfo>> l();
716 
718  hash hdr;
719 
720 public:
722 
724 
727  constructor(string mptype, string boundary = MultiPartMessage::getBoundary());
728 
729 
731  binary serialize();
732 
733 
735 
737  binary serializeBody();
738 
739 
741 
745  int size();
746 
747 
749 
753  string getBoundary();
754 
755 
757 
761  static binary serializeHeaders(hash hdr);
762 
764  static string getBoundary();
765 
767 
771  static string getRandomString(int len);
772 
774 
832  static hash<MessageInfo> parseBody(string boundary, string body, bool decode = True);
833 
835 
839  abstract hash<MessageInfo> getMsgAndHeaders();
840 
842  // don't reimplement this method; fix/enhance it in the module
843 
844 private:
845  final hash<MessageInfo> getMsgAndHeadersIntern(*string content_type, bool conlen = True);
846 public:
847 
848 
849  // don't reimplement this method; fix/enhance it in the module
850 
851 private:
852  splicePartIntern(data mime_data, hash hdr);
853 public:
854 
855 
856  // don't reimplement this method; fix/enhance it in the module
857 
858 private:
859  addPartIntern(data mime_data, hash hdr);
860 public:
861 
862 
863 
864 private:
865  static hash<MessagePartInfo> getPart(data mime_data, hash hdr);
866 public:
867 
869  };
870 
873 
874 public:
876  private :
877  // the starting part ID
878  string startid;
879 
880 public:
882 
884 
886  constructor(string boundary = MultiPartMessage::getBoundary()) ;
887 
888 
890 
897  splicePart(data mime_data, string id, string content_type, *hash hdr);
898 
899 
901 
908  addPart(data mime_data, string id, string content_type, *hash hdr);
909 
910 
912 
916  hash<MessageInfo> getMsgAndHeaders();
917 
918  };
919 
922 
923 public:
925 
927  constructor(string boundary = MultiPartMessage::getBoundary()) ;
928 
929 
931 
943  splicePart(data mime_data, string content_type = MimeTypeText, string disp = "inline", *hash hdr);
944 
945 
947 
959  addPart(data mime_data, string content_type = MimeTypeText, string disp = "inline", *hash hdr);
960 
961 
963 
977  spliceEncodePart(data mime_data, string enc, string content_type = MimeTypeText, string disp = "inline", *hash hdr);
978 
979 
981 
995  addEncodePart(data mime_data, string enc, string content_type = MimeTypeText, string disp = "inline", *hash hdr);
996 
997 
999 
1003  hash<MessageInfo> getMsgAndHeaders();
1004 
1005  };
1006 
1008 
1011 
1012 public:
1013  private :
1016 
1017 public:
1018 
1020 
1022  constructor(string boundary = MultiPartMessage::getBoundary()) ;
1023 
1024 
1026 
1032  splicePart(data mime_data, string name, *hash hdr);
1033 
1034 
1036 
1044  splicePart(data mime_data, string name, string filename, string content_type, *hash hdr);
1045 
1046 
1048 
1052  splicePart(hash<FormDataMessageInfo> h);
1053 
1054 
1056 
1062  addPart(data mime_data, string name, *hash hdr);
1063 
1064 
1066 
1074  addPart(data mime_data, string name, string filename, string content_type, *hash hdr);
1075 
1076 
1078 
1082  addPart(hash<FormDataMessageInfo> h);
1083 
1084 
1086 
1090  hash<MessageInfo> getMsgAndHeaders();
1091 
1092 
1094 
1103  static hash<string, hash<FormDataMessageInfo>> parseMessage(string content, string body);
1104 
1106 
1110  static MultiPartFormDataMessage makeMessage(hash<string, hash<FormDataMessageInfo>> parts);
1111 
1113 
1117  static binary makeMessageBody(hash<string, hash<FormDataMessageInfo>> parts);
1118 
1120 
1121 private:
1122  checkPartName(string name);
1123 public:
1124 
1125 
1127 
1128 private:
1129  hash getPartHeader(string name, *string filename, *string content_type, *hash hdr);
1130 public:
1131 
1132  };
1133 };
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
implements the MultiPartFormDataMessage class, a specialization of MultiPartMessage ...
Definition: Mime.qm.dox.h:1010
string getBoundary()
returns the message boundary string used
data body
the data for the message or part
Definition: Mime.qm.dox.h:162
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
hash parts
hash of part names to ensure uniqueness
Definition: Mime.qm.dox.h:1015
parsed form-data message part info
Definition: Mime.qm.dox.h:154
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...
const True
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...
string name
the name of the part
Definition: Mime.qm.dox.h:156
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
binary binary()
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 False
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
hash hdr
message or part headers
Definition: Mime.qm.dox.h:160
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
*string filename
the optional filename for the part
Definition: Mime.qm.dox.h:158
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
hash hash(object obj)
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...