    MIME :: array compose ( [ string text [, string html [, array attach [, integer unique [, string line_end ]]]]] )

    Return ARRAY ('header' => string value, 'content' => string value).

    Notice: Text or Html version of message must be set.

    Default values are:
    integer unique: 0
    string line_end: CRLF [\r\n]

    Example:

    // set text/plain version of message
    $text = MIME::message('Text version of message.', 'text/plain');
    // set text/html version of message
    $html = MIME::message('<b>HTML</b> version of <u>message</u>.', 'text/html');
    // add attachment with name 'file.txt'
    $at[] = MIME::message('source file', 'text/plain', 'file.txt', 'iso-8859-1', 'base64', 'attachment');

    // compose mail message in MIME format
    $mess = MIME::compose($text, $html, $at);

    // print result
    print_r($mess);

    See Also: MIME::message()

    [ Comments ]

    Last update: Thursday, August 16, 2007