Sender header class methods.

see RFC 2822
see RFC 2047
package Default

 Methods

Factory to generate a header object from a string

fromString(string $headerLine) 
Static
inherited_from \Zend\Mail\Header\HeaderInterface::fromString()

Parameters

$headerLine

Retrieve the internal address from this header

getAddress() : \Zend\Mail\Address\AddressInterface | null

Returns

\Zend\Mail\Address\AddressInterfacenull

Get header encoding

getEncoding() 
inherited_from \Zend\Mail\Header\HeaderInterface::getEncoding()

Retrieve header name

getFieldName() 
inherited_from \Zend\Mail\Header\HeaderInterface::getFieldName()

Retrieve header value

getFieldValue(boolean $format = \Zend\Mail\Header\HeaderInterface::FORMAT_RAW
inherited_from \Zend\Mail\Header\HeaderInterface::getFieldValue()

Parameters

$format

Set the address used in this header

setAddress(string|\Zend\Mail\Address\AddressInterface $emailOrAddress, null|string $name = null) : \Zend\Mail\Header\Sender

Parameters

$emailOrAddress

string\Zend\Mail\Address\AddressInterface

$name

nullstring

Exceptions

\Zend\Mail\Header\Exception\InvalidArgumentException

Returns

\Zend\Mail\Header\Sender

Set header encoding

setEncoding(string $encoding) 
inherited_from \Zend\Mail\Header\HeaderInterface::setEncoding()

Parameters

$encoding

Cast to string

toString() 

Returns in form of "NAME: VALUE"

inherited_from \Zend\Mail\Header\HeaderInterface::toString()

 Properties

 

$address

$address : \Zend\Mail\Address\AddressInterface

Default

 

Header encoding

$encoding : null | string

Default