Extracted from Pike v7.3 release 18 at 2002-03-27.
pike.roxen.com
[Top]
MIME
MIME.Message

Method MIME.Message()->create()


Method create

void MIME.Message()->create()
void MIME.Message()->create(string message)
void MIME.Message()->create(string message, mapping(string:string|array(string)) headers, array(object)|void parts)

Description

There are several ways to call the constructor of the Message class:

With zero arguments, you will get a dummy message with neither headers nor body. Not very useful.

With one argument, the argument is taken to be a byte stream containing a message in encoded form. The constructor will analyze the string and extract headers and body.

With two or three arguments, the first argument is taken to be the raw body data, and the second argument a desired set of headers. The keys of this mapping are not case-sensitive. If the given headers indicate that the message should be of type multipart, an array of Message objects constituting the subparts should be given as a third argument.

See also

MIME.Message.cast