1368. Function

1368.1. Zend\Mail\Storage\Part\isMultipart

ZendMailStoragePartisMultipart()

Check if part is a multipart message

Return type:bool if part is multipart

1369. Function

1369.1. Zend\Mail\Storage\Part\getContent

ZendMailStoragePartgetContent()

Body of part

If part is multipart the raw content of this part with all sub parts is returned

Return type:string body
Throws :ExceptionExceptionInterface

1370. Function

1370.1. Zend\Mail\Storage\Part\getSize

ZendMailStoragePartgetSize()

Return size of part

Return type:int size

1371. Function

1371.1. Zend\Mail\Storage\Part\getPart

ZendMailStoragePartgetPart()

Get part of multipart message

Parameters:int – number of part starting with 1 for first part
Return type:PartInterface wanted part
Throws :ExceptionExceptionInterface

1372. Function

1372.1. Zend\Mail\Storage\Part\countParts

ZendMailStoragePartcountParts()

Count parts of a multipart part

Return type:int number of sub-parts

1373. Function

1373.1. Zend\Mail\Storage\Part\getHeaders

ZendMailStoragePartgetHeaders()

Get all headers

The returned headers are as saved internally. All names are lowercased. The value is a string or an array if a header with the same name occurs more than once.

Return type:ZendMailHeaders

1374. Function

1374.1. Zend\Mail\Storage\Part\getHeader

ZendMailStoragePartgetHeader()

Get a header in specified format

Internally headers that occur more than once are saved as array, all other as string. If $format is set to string implode is used to concat the values (with ZendMimeMime::LINEEND as delim).

Parameters:
  • string – name of header, matches case-insensitive, but camel-case is replaced with dashes
  • string – change type of return value to ‘string’ or ‘array’
Return type:

string|array|ZendMailHeaderHeaderInterface|ArrayIterator value of header in wanted or internal format

Throws :

ExceptionExceptionInterface

1375. Function

1375.1. Zend\Mail\Storage\Part\getHeaderField

ZendMailStoragePartgetHeaderField()

Get a specific field from a header like content type or all fields as array

If the header occurs more than once, only the value from the first header is returned.

Throws an exception if the requested header does not exist. If the specific header field does not exist, returns null.

Parameters:
  • string – name of header, like in getHeader()
  • string – the wanted part, default is first, if null an array with all parts is returned
  • string – key name for the first part
Return type:

string|array wanted part or all parts as array($firstName => firstPart, partname => value)

Throws :

ExceptionExceptionInterface

1376. Function

1376.1. Zend\Mail\Storage\Part\__get

ZendMailStoragePart__get()

Getter for mail headers - name is matched in lowercase

This getter is short for PartInterface::getHeader($name, ‘string’)

Parameters:string – header name
Return type:string value of header
Throws :ExceptionExceptionInterface

1377. Function

1377.1. Zend\Mail\Storage\Part\__toString

ZendMailStoragePart__toString()

magic method to get content of part

Return type:string content