158 "7z":
"application/x-7z-compressed",
159 "ai":
"application/postscript",
160 "aif":
"audio/x-aiff",
161 "aifc":
"audio/x-aiff",
162 "aiff":
"audio/x-aiff",
164 "atom":
"application/atom+xml",
166 "avi":
"video/x-msvideo",
167 "bcpio":
"application/x-bcpio",
170 "bz2":
"application/x-bzip",
172 "cdf":
"application/x-netcdf",
175 "cpio":
"application/x-cpio",
177 "cpt":
"application/mac-compactpro",
178 "csh":
"application/x-csh",
181 "dcr":
"application/x-director",
183 "dir":
"application/x-director",
184 "djv":
"image/vnd.djvu",
185 "djvu":
"image/vnd.djvu",
189 "doc":
"application/msword",
190 "dtd":
"application/xml-dtd",
192 "dvi":
"application/x-dvi",
193 "dxr":
"application/x-director",
194 "eps":
"application/postscript",
195 "etx":
"text/x-setext",
197 "ez":
"application/andrew-inset",
199 "gram":
"application/srgs",
200 "grxml":
"application/srgs+xml",
201 "gtar":
"application/x-gtar",
202 "gz":
"application/x-gzip",
204 "hdf":
"application/x-hdf",
207 "hqx":
"application/mac-binhex40",
210 "ice":
"x-conference/x-cooltalk",
211 "ico":
"image/x-icon",
212 "ics":
"text/calendar",
214 "ifb":
"text/calendar",
215 "iges":
"model/iges",
217 "jar":
"application/java-archive",
219 "jnlp":
"application/x-java-jnlp-file",
226 "latex":
"application/x-latex",
229 "m3u":
"audio/x-mpegurl",
230 "m4a":
"audio/mp4a-latm",
231 "m4b":
"audio/mp4a-latm",
232 "m4p":
"audio/mp4a-latm",
233 "m4u":
"video/vnd.mpegurl",
234 "m4v":
"video/x-m4v",
235 "mac":
"image/x-macpaint",
236 "man":
"application/x-troff-man",
237 "mathml":
"application/mathml+xml",
238 "me":
"application/x-troff-me",
239 "mesh":
"model/mesh",
241 "midi":
"audio/midi",
242 "mif":
"application/vnd.mif",
243 "mov":
"video/quicktime",
244 "movie":
"video/x-sgi-movie",
249 "mpeg":
"video/mpeg",
251 "mpga":
"audio/mpeg",
252 "ms":
"application/x-troff-ms",
254 "mxu":
"video/vnd.mpegurl",
255 "nc":
"application/x-netcdf",
256 "oda":
"application/oda",
257 "ogg":
"application/ogg",
258 "pbm":
"image/x-portable-bitmap",
260 "pdb":
"chemical/x-pdb",
261 "pdf":
"application/pdf",
262 "pgm":
"image/x-portable-graymap",
263 "pgn":
"application/x-chess-pgn",
265 "pict":
"image/pict",
267 "pnm":
"image/x-portable-anymap",
268 "pnt":
"image/x-macpaint",
269 "pntg":
"image/x-macpaint",
270 "ppm":
"image/x-portable-pixmap",
271 "ppt":
"application/vnd.ms-powerpoint",
272 "ps":
"application/postscript",
304 "qt":
"video/quicktime",
305 "qti":
"image/x-quicktime",
306 "qtif":
"image/x-quicktime",
307 "ra":
"audio/x-pn-realaudio",
308 "ram":
"audio/x-pn-realaudio",
309 "ras":
"image/x-cmu-raster",
310 "rdf":
"application/rdf+xml",
311 "rgb":
"image/x-rgb",
312 "rm":
"application/vnd.rn-realmedia",
313 "roff":
"application/x-troff",
315 "rtx":
"text/richtext",
318 "sh":
"application/x-sh",
319 "shar":
"application/x-shar",
320 "silo":
"model/mesh",
321 "sit":
"application/x-stuffit",
322 "skd":
"application/x-koan",
323 "skm":
"application/x-koan",
324 "skp":
"application/x-koan",
325 "skt":
"application/x-koan",
326 "smi":
"application/smil",
327 "smil":
"application/smil",
328 "snd":
"audio/basic",
330 "spl":
"application/x-futuresplash",
331 "src":
"application/x-wais-source",
332 "sv4cpio":
"application/x-sv4cpio",
333 "sv4crc":
"application/x-sv4crc",
334 "svg":
"image/svg+xml",
335 "swf":
"application/x-shockwave-flash",
336 "t":
"application/x-troff",
337 "tar":
"application/x-tar",
338 "tar.bz2":
"application/x-bzip-compressed-tar",
339 "tar.gz":
"application/x-tar-gz",
340 "tbz":
"application/x-bzip-compressed-tar",
341 "tcl":
"application/x-tcl",
342 "tex":
"application/x-tex",
343 "texi":
"application/x-texinfo",
344 "texinfo":
"application/x-texinfo",
346 "tgz":
"application/x-tar-gz",
348 "tiff":
"image/tiff",
349 "tr":
"application/x-troff",
350 "tsv":
"text/tab-separated-values",
352 "ustar":
"application/x-ustar",
353 "vcd":
"application/x-cdlink",
354 "vrml":
"model/vrml",
355 "vxml":
"application/voicexml+xml",
356 "wav":
"audio/x-wav",
357 "wbmp":
"image/vnd.wap.wbmp",
358 "wbmxl":
"application/vnd.wap.wbxml",
359 "wml":
"text/vnd.wap.wml",
360 "wmlc":
"application/vnd.wap.wmlc",
361 "wmls":
"text/vnd.wap.wmlscript",
362 "wmlsc":
"application/vnd.wap.wmlscriptc",
364 "wsdl":
"application/wsdl+xml",
365 "xbm":
"image/x-xbitmap",
366 "xht":
"application/xhtml+xml",
367 "xhtml":
"application/xhtml+xml",
368 "xls":
"application/vnd.ms-excel",
370 "xpm":
"image/x-xpixmap",
372 "xsl":
"application/xml",
373 "xslt":
"application/xslt+xml",
374 "xul":
"application/vnd.mozilla.xul+xml",
375 "xwd":
"image/x-xwindowdump",
376 "xyz":
"chemical/x-xyz",
378 "zip":
"application/zip",
538 const MP_DEFAULT_MSG =
"This is a MIME multipart message";
650 abstract hash getMsgAndHeaders();
653 final private hash getMsgAndHeadersIntern(*
string content_type,
bool conlen =
True);
657 private splicePartIntern(data data,
hash hdr);
661 private addPartIntern(data data,
hash hdr);
666 static hash getPart(data data,
hash hdr);
709 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:522
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:119
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:513
constructor(string mptype, string boundary=MultiPartMessage::getBoundary())
creates the object
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:389
MultiPartMessage class implementation.
Definition: Mime.qm.dox.h:535
const MimeTypeYaml
Mime type for yaml data files.
Definition: Mime.qm.dox.h:128
const MimeTypeXml
Mime type for plain (human-readable) xml files.
Definition: Mime.qm.dox.h:131
const MPT_ENCRYPTED
for sending encrypted messages (http://tools.ietf.org/html/rfc1847#section-2.2)
Definition: Mime.qm.dox.h:528
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:722
const MPT_ALTERNATIVE
for sending multiple "alternatives" of the same content (http://tools.ietf.org/html/rfc2046#section-5...
Definition: Mime.qm.dox.h:519
const MimeTypeJsonRpc
Mime type for JSON-RPC.
Definition: Mime.qm.dox.h:140
const MPT_BYTERANGES
for sending noncontiguous byte ranges of a single message (http://tools.ietf.org/html/rfc2616) ...
Definition: Mime.qm.dox.h:531
const MimeTypeJson
Mime type for JSON.
Definition: Mime.qm.dox.h:137
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:525
const ContentTransEncBase64
base-64 Content-Transfer-Encoding
Definition: Mime.qm.dox.h:395
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:122
const MimeQuotedPrintableLineLen
maximum line length for quoted-printable encoding
Definition: Mime.qm.dox.h:408
const MimeTypeJavascript
Mime type for Javascript.
Definition: Mime.qm.dox.h:149
const MimeTypeUnknown
MIME type for unknown file types.
Definition: Mime.qm.dox.h:107
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 MimeTypeCss
Mime type for css.
Definition: Mime.qm.dox.h:152
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:146
const MimeTypeXmlRpc
Mime type for XML-RPC.
Definition: Mime.qm.dox.h:143
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:510
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:516
const MPT_FORM_DATA
for form data (http://tools.ietf.org/html/rfc1867, http://tools.ietf.org/html/rfc2388) ...
Definition: Mime.qm.dox.h:507
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:398
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:403
const MimeTypeHtml
MIME type for HTML.
Definition: Mime.qm.dox.h:113
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:157
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:125
const ContentTransEncBinary
binary transfer encoding; implies no maximum line length (= no encoding)
Definition: Mime.qm.dox.h:392
const MimeTypeXmlApp
Mime type for more complicated (not human-readable) xml files.
Definition: Mime.qm.dox.h:134
const ContentTransEnc7Bit
default Content-Transfer-Encoding if none is present; implies lines < 1000 chars (= no encoding) ...
Definition: Mime.qm.dox.h:386
const MimeTypeCsv
MIME type for csv files (http://tools.ietf.org/html/rfc4180)
Definition: Mime.qm.dox.h:116
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:110
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...