174 "7z":
"application/x-7z-compressed",
175 "ai":
"application/postscript",
176 "aif":
"audio/x-aiff",
177 "aifc":
"audio/x-aiff",
178 "aiff":
"audio/x-aiff",
180 "atom":
"application/atom+xml",
182 "avi":
"video/x-msvideo",
183 "bcpio":
"application/x-bcpio",
184 "bin": MimeTypeUnknown,
186 "bz2":
"application/x-bzip",
188 "cdf":
"application/x-netcdf",
190 "class": MimeTypeUnknown,
191 "cpio":
"application/x-cpio",
193 "cpt":
"application/mac-compactpro",
194 "csh":
"application/x-csh",
197 "dcr":
"application/x-director",
199 "dir":
"application/x-director",
200 "djv":
"image/vnd.djvu",
201 "djvu":
"image/vnd.djvu",
202 "dll": MimeTypeUnknown,
203 "dmg": MimeTypeUnknown,
204 "dms": MimeTypeUnknown,
205 "doc":
"application/msword",
206 "dtd":
"application/xml-dtd",
208 "dvi":
"application/x-dvi",
209 "dxr":
"application/x-director",
210 "eps":
"application/postscript",
211 "etx":
"text/x-setext",
212 "exe": MimeTypeUnknown,
213 "ez":
"application/andrew-inset",
215 "gram":
"application/srgs",
216 "grxml":
"application/srgs+xml",
217 "gtar":
"application/x-gtar",
218 "gz":
"application/x-gzip",
220 "hdf":
"application/x-hdf",
223 "hqx":
"application/mac-binhex40",
226 "ice":
"x-conference/x-cooltalk",
227 "ico":
"image/x-icon",
228 "ics":
"text/calendar",
230 "ifb":
"text/calendar",
231 "iges":
"model/iges",
233 "jar":
"application/java-archive",
235 "jnlp":
"application/x-java-jnlp-file",
242 "latex":
"application/x-latex",
243 "lha": MimeTypeUnknown,
244 "lzh": MimeTypeUnknown,
245 "m3u":
"audio/x-mpegurl",
246 "m4a":
"audio/mp4a-latm",
247 "m4b":
"audio/mp4a-latm",
248 "m4p":
"audio/mp4a-latm",
249 "m4u":
"video/vnd.mpegurl",
250 "m4v":
"video/x-m4v",
251 "mac":
"image/x-macpaint",
252 "man":
"application/x-troff-man",
253 "mathml":
"application/mathml+xml",
254 "me":
"application/x-troff-me",
255 "mesh":
"model/mesh",
257 "midi":
"audio/midi",
258 "mif":
"application/vnd.mif",
259 "mov":
"video/quicktime",
260 "movie":
"video/x-sgi-movie",
265 "mpeg":
"video/mpeg",
267 "mpga":
"audio/mpeg",
268 "ms":
"application/x-troff-ms",
270 "mxu":
"video/vnd.mpegurl",
271 "nc":
"application/x-netcdf",
272 "oda":
"application/oda",
273 "ogg":
"application/ogg",
274 "pbm":
"image/x-portable-bitmap",
276 "pdb":
"chemical/x-pdb",
277 "pdf":
"application/pdf",
278 "pgm":
"image/x-portable-graymap",
279 "pgn":
"application/x-chess-pgn",
281 "pict":
"image/pict",
283 "pnm":
"image/x-portable-anymap",
284 "pnt":
"image/x-macpaint",
285 "pntg":
"image/x-macpaint",
286 "ppm":
"image/x-portable-pixmap",
287 "ppt":
"application/vnd.ms-powerpoint",
288 "ps":
"application/postscript",
320 "qt":
"video/quicktime",
321 "qti":
"image/x-quicktime",
322 "qtif":
"image/x-quicktime",
323 "ra":
"audio/x-pn-realaudio",
324 "ram":
"audio/x-pn-realaudio",
325 "ras":
"image/x-cmu-raster",
326 "rdf":
"application/rdf+xml",
327 "rgb":
"image/x-rgb",
328 "rm":
"application/vnd.rn-realmedia",
329 "roff":
"application/x-troff",
331 "rtx":
"text/richtext",
334 "sh":
"application/x-sh",
335 "shar":
"application/x-shar",
336 "silo":
"model/mesh",
337 "sit":
"application/x-stuffit",
338 "skd":
"application/x-koan",
339 "skm":
"application/x-koan",
340 "skp":
"application/x-koan",
341 "skt":
"application/x-koan",
342 "smi":
"application/smil",
343 "smil":
"application/smil",
344 "snd":
"audio/basic",
345 "so": MimeTypeUnknown,
346 "spl":
"application/x-futuresplash",
347 "src":
"application/x-wais-source",
348 "sv4cpio":
"application/x-sv4cpio",
349 "sv4crc":
"application/x-sv4crc",
350 "svg":
"image/svg+xml",
351 "swf":
"application/x-shockwave-flash",
352 "t":
"application/x-troff",
353 "tar":
"application/x-tar",
354 "tar.bz2":
"application/x-bzip-compressed-tar",
355 "tar.gz":
"application/x-tar-gz",
356 "tbz":
"application/x-bzip-compressed-tar",
357 "tcl":
"application/x-tcl",
358 "tex":
"application/x-tex",
359 "texi":
"application/x-texinfo",
360 "texinfo":
"application/x-texinfo",
362 "tgz":
"application/x-tar-gz",
364 "tiff":
"image/tiff",
365 "tr":
"application/x-troff",
366 "tsv":
"text/tab-separated-values",
368 "ustar":
"application/x-ustar",
369 "vcd":
"application/x-cdlink",
370 "vrml":
"model/vrml",
371 "vxml":
"application/voicexml+xml",
372 "wav":
"audio/x-wav",
373 "wbmp":
"image/vnd.wap.wbmp",
374 "wbmxl":
"application/vnd.wap.wbxml",
375 "wml":
"text/vnd.wap.wml",
376 "wmlc":
"application/vnd.wap.wmlc",
377 "wmls":
"text/vnd.wap.wmlscript",
378 "wmlsc":
"application/vnd.wap.wmlscriptc",
380 "wsdl":
"application/wsdl+xml",
381 "xbm":
"image/x-xbitmap",
382 "xht":
"application/xhtml+xml",
383 "xhtml":
"application/xhtml+xml",
384 "xls":
"application/vnd.ms-excel",
386 "xpm":
"image/x-xpixmap",
388 "xsl":
"application/xml",
389 "xslt":
"application/xslt+xml",
390 "xul":
"application/vnd.mozilla.xul+xml",
391 "xwd":
"image/x-xwindowdump",
392 "xyz":
"chemical/x-xyz",
394 "zip":
"application/zip",
554 const MP_DEFAULT_MSG =
"This is a MIME multipart message";
675 final private hash getMsgAndHeadersIntern(*
string content_type,
bool conlen =
True);
679 private splicePartIntern(data data,
hash hdr);
683 private addPartIntern(data data,
hash hdr);
688 static hash getPart(data data,
hash hdr);
731 addPart(data data,
string id,
string content_type, *
hash hdr);
const MPT_RELATED
for sending multiple components of an aggregated whole (http://tools.ietf.org/html/rfc2387) ...
Definition: Mime.qm.dox.h:538
data mime_encode_transfer_data(data data, string enc)
encodes data according to the given encoding
const MimeTypeJpeg
MIME type for jpeg images.
Definition: Mime.qm.dox.h:135
constructor(string boundary=MultiPartMessage::getBoundary())
creates the object
const MPT_MESSAGE
for email/MIME messages with headers (http://tools.ietf.org/html/rfc2046)
Definition: Mime.qm.dox.h:529
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:405
MultiPartMessage class implementation.
Definition: Mime.qm.dox.h:551
const MimeTypeYaml
Mime type for yaml data files.
Definition: Mime.qm.dox.h:144
const MimeTypeXml
Mime type for plain (human-readable) xml files.
Definition: Mime.qm.dox.h:147
const MPT_ENCRYPTED
for sending encrypted messages (http://tools.ietf.org/html/rfc1847#section-2.2)
Definition: Mime.qm.dox.h:544
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
addEncodePart(data 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...
implements a MultiPartMixedMessage class, a specialization of MultiPartMessage
Definition: Mime.qm.dox.h:744
const MPT_ALTERNATIVE
for sending multiple "alternatives" of the same content (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:535
const MimeTypeJsonRpc
Mime type for JSON-RPC.
Definition: Mime.qm.dox.h:156
const MPT_BYTERANGES
for sending noncontiguous byte ranges of a single message (http://tools.ietf.org/html/rfc2616) ...
Definition: Mime.qm.dox.h:547
const MimeTypeJson
Mime type for JSON.
Definition: Mime.qm.dox.h:153
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:541
const ContentTransEncBase64
base-64 Content-Transfer-Encoding
Definition: Mime.qm.dox.h:411
binary serialize()
serializes the message and returns a binary object ready to send over a socket
const MimeTypePng
MIME type for png images.
Definition: Mime.qm.dox.h:138
const MimeQuotedPrintableLineLen
maximum line length for quoted-printable encoding
Definition: Mime.qm.dox.h:424
const MimeTypeJavascript
Mime type for Javascript.
Definition: Mime.qm.dox.h:165
string mime_decode_base64_to_string(data str, *string encoding)
returns a string value from a string in "BASE64" encoding according to RFC 2045
splicePart(data 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...
const MimeTypeOctetStream
MIME type for unknown file types.
Definition: Mime.qm.dox.h:123
const MimeTypeCss
Mime type for css.
Definition: Mime.qm.dox.h:168
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...
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:162
abstract hash getMsgAndHeaders()
returns a hash of the message
const MimeTypeXmlRpc
Mime type for XML-RPC.
Definition: Mime.qm.dox.h:159
string get_mime_type_from_ext(string path)
returns the mime type for the given filename from the extension or MimeTypeUnknown if the extension i...
const MPT_MIXED
for sending files with different "Content-Type" headers (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:526
string mime_encode_base64(data str, int len=MimeBase64LineLen)
returns a string in "BASE64" encoding according to RFC 2045
const MPT_DIGEST
for sending multiple text messages (http://tools.ietf.org/html/rfc2046#section-5.1.5)
Definition: Mime.qm.dox.h:532
const MPT_FORM_DATA
for form data (http://tools.ietf.org/html/rfc1867, http://tools.ietf.org/html/rfc2388) ...
Definition: Mime.qm.dox.h:523
spliceEncodePart(data 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...
const ContentTransEncQuotedPrintable
quoted-printable Content-Transfer-Encoding
Definition: Mime.qm.dox.h:414
hash getMsgAndHeaders()
returns a hash of 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 hash parseBody(string boundary, string body, bool decode=True)
returns a hash representing a parsed multipart message body from a boundary string and body arguments...
static string getRandomString(int len)
returns a string of random characters
data mime_decode_transfer_data(data data, string enc, *string ct)
decodes data according to the given encoding
const MimeBase64LineLen
maximum line length for base64 encoding
Definition: Mime.qm.dox.h:419
constructor(string n_mptype, string n_boundary=MultiPartMessage::getBoundary())
creates the object
const MimeTypeHtml
MIME type for HTML.
Definition: Mime.qm.dox.h:129
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:173
static string getBoundary()
returns a string embedded with the current timestamp designed to be used as MultiPart boundary string...
const MimeTypeSoapXml
Mime type for SOAP XML messages (XML MIME type reference: http://tools.ietf.org/html/rfc3023) ...
Definition: Mime.qm.dox.h:141
const ContentTransEncBinary
binary transfer encoding; implies no maximum line length (= no encoding)
Definition: Mime.qm.dox.h:408
const MimeTypeXmlApp
Mime type for more complicated (not human-readable) xml files.
Definition: Mime.qm.dox.h:150
const ContentTransEnc7Bit
default Content-Transfer-Encoding if none is present; implies lines < 1000 chars (= no encoding) ...
Definition: Mime.qm.dox.h:402
const MimeTypeCsv
MIME type for csv files (http://tools.ietf.org/html/rfc4180)
Definition: Mime.qm.dox.h:132
addPart(data 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 MimeTypeText
MIME type for text.
Definition: Mime.qm.dox.h:126
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...