API Documentation

Zend/Mime/Message.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Mime  
Version
$Id: Message.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Mime_Message

Package: Zend\Mime

Children
\Zend_Mail
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected  $_mime= 'null'
Default valuenullDetails
Type
Propertyprotected  $_parts= 'array()'
Default valuearray()Details
Type

Methods

methodprotected_disassembleMime( string $body, string $boundary ) : array
static

Explode MIME multipart string into seperate parts

Parts consist of the header and the body of each MIME part.

Parameters
Name Type Description
$body string
$boundary string
Returns
Type Description
array
methodpublicaddPart( \Zend_Mime_Part $part ) : void

Append a new Zend_Mime_Part to the current message

Parameters
Name Type Description
$part \Zend_Mime_Part
methodpubliccreateFromMessage( string $message, string $boundary, string $EOL = Zend_Mime::LINEEND ) : \Zend_Mime_Message
static

Decodes a MIME encoded string and returns a Zend_Mime_Message object with all the MIME parts set according to the given string

Parameters
Name Type Description
$message string
$boundary string
$EOL string

EOL string; defaults to {@link Zend_Mime::LINEEND}

Returns
Type Description
\Zend_Mime_Message
methodpublicgenerateMessage( string $EOL = Zend_Mime::LINEEND ) : string

Generate MIME-compliant message from the current configuration

This can be a multipart message if more than one MIME part was added. If only one part is present, the content of this part is returned. If no part had been added, an empty string is returned.

Parts are seperated by the mime boundary as defined in Zend_Mime. If {@link setMime()} has been called before this method, the Zend_Mime object set by this call will be used. Otherwise, a new Zend_Mime object is generated and used.

Parameters
Name Type Description
$EOL string

EOL string; defaults to {@link Zend_Mime::LINEEND}

Returns
Type Description
string
methodpublicgetMime( ) : \Zend_Mime

Returns the Zend_Mime object in use by the message

If the object was not present, it is created and returned. Can be used to determine the boundary used in this message.

Returns
Type Description
\Zend_Mime
methodpublicgetPartContent( int $partnum,  $EOL = Zend_Mime::LINEEND ) : string

Get the (encoded) content of a given part as a string

Parameters
Name Type Description
$partnum int
$EOL
Returns
Type Description
string
methodpublicgetPartHeaders( int $partnum,  $EOL = Zend_Mime::LINEEND ) : string

Get the headers of a given part as a string

Parameters
Name Type Description
$partnum int
$EOL
Returns
Type Description
string
methodpublicgetPartHeadersArray( int $partnum ) : array

Get the headers of a given part as an array

Parameters
Name Type Description
$partnum int
Returns
Type Description
array
methodpublicgetParts( ) : array

Returns the list of all Zend_Mime_Parts in the message

Returns
Type Description
array of Zend_Mime_Part
methodpublicisMultiPart( ) : boolean

Check if message needs to be sent as multipart MIME message or if it has only one part.

Returns
Type Description
boolean
methodpublicsetMime( \Zend_Mime $mime ) : void

Set Zend_Mime object for the message

This can be used to set the boundary specifically or to use a subclass of Zend_Mime for generating the boundary.

Parameters
Name Type Description
$mime \Zend_Mime
methodpublicsetParts( array $parts ) : void

Sets the given array of Zend_Mime_Parts as the array for the message

Parameters
Name Type Description
$parts array
Documentation was generated by DocBlox 0.15.1.