Fully Qualified Name: | Zend\Mail\Message |
Name | Description | Defined By |
---|---|---|
addBcc() | Add a "Bcc" address | Message |
addCc() | Add a "Cc" address | Message |
addFrom() | Add a "From" address | Message |
addReplyTo() | Add one or more addresses to the Reply-To recipients | Message |
addTo() | Add one or more addresses to the To recipients | Message |
fromString() | Instantiate from raw message string | Message |
getBcc() | Retrieve list of BCC recipients | Message |
getBody() | Return the currently set message body | Message |
getBodyText() | Get the string-serialized message body text | Message |
getCc() | Retrieve list of CC recipients | Message |
getEncoding() | Get the message encoding | Message |
getFrom() | Retrieve list of From senders | Message |
getHeaders() | Access headers collection | Message |
getReplyTo() | Access the address list of the Reply-To header | Message |
getSender() | Retrieve the sender address, if any | Message |
getSubject() | Get the message subject header value | Message |
getTo() | Access the address list of the To header | Message |
isValid() | Is the message valid? | Message |
setBcc() | Set (overwrite) BCC addresses | Message |
setBody() | Set the message body | Message |
setCc() | Set (overwrite) CC addresses | Message |
setEncoding() | Set the message encoding | Message |
setFrom() | Set (overwrite) From addresses | Message |
setHeaders() | Compose headers | Message |
setReplyTo() | Overwrite the address list in the Reply-To recipients | Message |
setSender() | setSender | Message |
setSubject() | Set the message subject header value | Message |
setTo() | Overwrite the address list in the To recipients | Message |
toString() | Serialize to string | Message |
Add a "Bcc" address
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressOrList | string|\Address|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Add a "Cc" address
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressOrList | string|\Address|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Add a "From" address
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressOrList | string|\Address|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Add one or more addresses to the Reply-To recipients
Appends to the list.
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressOrList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | null|string |
Returns: \Message
Add one or more addresses to the To recipients
Appends to the list.
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressOrList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | null|string |
Returns: \Message
Instantiate from raw message string
Parameter Name | Type | Description |
---|---|---|
$rawMessage | string |
Returns: \Message
Retrieve list of BCC recipients
Returns: \AddressList
Return the currently set message body
Returns: object|string|\Mime\Message
Get the string-serialized message body text
Returns: string
Retrieve list of CC recipients
Returns: \AddressList
Get the message encoding
Returns: string
Retrieve list of From senders
Returns: \AddressList
Access headers collection
Lazy-loads if not already attached.
Returns: \Headers
Access the address list of the Reply-To header
Returns: \AddressList
Retrieve the sender address, if any
Returns: null|\Address\AddressInterface
Get the message subject header value
Returns: null|string
Access the address list of the To header
Returns: \AddressList
Is the message valid?
If we don't any From addresses, we're invalid, according to RFC2822.
Returns: bool
Set (overwrite) BCC addresses
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Set the message body
Parameter Name | Type | Description |
---|---|---|
$body | null|string|\Zend\Mime\Message|object |
Returns: \Message
Set (overwrite) CC addresses
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Set the message encoding
Parameter Name | Type | Description |
---|---|---|
$encoding | string |
Returns: \Message
Set (overwrite) From addresses
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | string|null |
Returns: \Message
Compose headers
Parameter Name | Type | Description |
---|---|---|
$headers | \Headers |
Returns: \Message
Overwrite the address list in the Reply-To recipients
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | null|string |
Returns: \Message
setSender
Parameter Name | Type | Description |
---|---|---|
$emailOrAddress | mixed | |
$name | mixed |
Returns: \Message
Set the message subject header value
Parameter Name | Type | Description |
---|---|---|
$subject | string |
Returns: \Message
Overwrite the address list in the To recipients
Parameter Name | Type | Description |
---|---|---|
$emailOrAddressList | string|\Address\AddressInterface|array|\AddressList|\Traversable | |
$name | null|string |
Returns: \Message
Serialize to string
Returns: string