Mail_mimePart::encode() – encode a mail


require_once 'Mail/mimePart.php';

array encode ( string $boundary = null )


Encodes and returns the email


  • string $boundary - Optional pre-defined boundary string

Return value

array - an associative array containing two elements, body and headers. The headers element is itself an indexed array.

The key names are

  • 'headers' - an array with the mail headers
  • 'body' - a string with the mail body


This function can not be called statically.

add sub part to a MIME part (Previous) encode a mail (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.