Zend\Mime\Mime
Support class for MultiPart Mime Messages
Synopsis
class Mime
{
- // constants
- const TYPE_OCTETSTREAM = 'application/octet-stream';
- const TYPE_TEXT = 'text/plain';
- const TYPE_HTML = 'text/html';
- const ENCODING_7BIT = '7bit';
- const ENCODING_8BIT = '8bit';
- const ENCODING_QUOTEDPRINTABLE = 'quoted-printable';
- const ENCODING_BASE64 = 'base64';
- const DISPOSITION_ATTACHMENT = 'attachment';
- const DISPOSITION_INLINE = 'inline';
- const LINELENGTH = 72;
- const LINEEND = "\n";
- const MULTIPART_ALTERNATIVE = 'multipart/alternative';
- const MULTIPART_MIXED = 'multipart/mixed';
- const MULTIPART_RELATED = 'multipart/related';
- // members
- protected $boundary;
- protected integer $makeUnique;
- public array $qpKeys;
- public array $qpReplaceValues;
- public string $qpKeysString;
- // methods
- public static bool isPrintable()
- public static string encodeQuotedPrintable()
- private static string _encodeQuotedPrintable()
- public static string encodeQuotedPrintableHeader()
- private static string getNextQuotedPrintableToken()
- public static string encodeBase64Header()
- public static string encodeBase64()
- public void __construct()
- public static string encode()
- public string boundary()
- public string boundaryLine()
- public string mimeEnd()
Constants
Name | Value |
---|---|
TYPE_OCTETSTREAM | 'application/octet-stream' |
TYPE_TEXT | 'text/plain' |
TYPE_HTML | 'text/html' |
ENCODING_7BIT | '7bit' |
ENCODING_8BIT | '8bit' |
ENCODING_QUOTEDPRINTABLE | 'quoted-printable' |
ENCODING_BASE64 | 'base64' |
DISPOSITION_ATTACHMENT | 'attachment' |
DISPOSITION_INLINE | 'inline' |
LINELENGTH | 72 |
LINEEND | "\n" |
MULTIPART_ALTERNATIVE | 'multipart/alternative' |
MULTIPART_MIXED | 'multipart/mixed' |
MULTIPART_RELATED | 'multipart/related' |
Members
protected
- $boundary
- $makeUnique
public
- $qpKeys
- $qpKeysString
- $qpReplaceValues
Methods
private
- _encodeQuotedPrintable() — Converts a string into quoted printable format.
- getNextQuotedPrintableToken() — Retrieves the first token from a quoted printable string.
public
- __construct() — Constructor
- boundary() — Return a MIME boundary
- boundaryLine() — Return a MIME boundary line
- encode() — Encode the given string with the given encoding.
- encodeBase64() — Encode a given string in base64 encoding and break lines according to the maximum linelength.
- encodeBase64Header() — Encode a given string in mail header compatible base64 encoding.
- encodeQuotedPrintable() — Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
- encodeQuotedPrintableHeader() — Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers.
- isPrintable() — Check if the given string is "printable"
- mimeEnd() — Return MIME ending