1143. Class

1143.1. Zend\Mail\AddressList

1143.1.1. Methods

1143.1.1.1. add

add()

Add an address to the list

Parameters:
  • string|AddressAddressInterface
  • null|string
Throws ExceptionInvalidArgumentException:
 
Return type:

AddressList

1143.1.1.2. addMany

addMany()

Add many addresses at once

If an email key is provided, it will be used as the email, and the value as the name. Otherwise, the value is passed as the sole argument to add(), and, as such, can be either email strings or AddressAddressInterface objects.

Parameters:array
Throws ExceptionRuntimeException:
 
Return type:AddressList

1143.1.1.3. merge

merge()

Merge another address list into this one

Parameters:AddressList
Return type:AddressList

1143.1.1.4. has

has()

Does the email exist in this list?

Parameters:string
Return type:bool

1143.1.1.5. get

get()

Get an address by email

Parameters:string
Return type:bool|AddressAddressInterface

1143.1.1.6. delete

delete()

Delete an address from the list

Parameters:string
Return type:bool

1143.1.1.7. count

count()

Return count of addresses

Return type:int

1143.1.1.8. rewind

rewind()

Rewind iterator

Return type:mixed the value of the first addresses element, or false if the addresses is

empty.

see:

1143.1.1.9. current

current()

Return current item in iteration

Return type:Address

1143.1.1.10. key

key()

Return key of current item of iteration

Return type:string

1143.1.1.12. valid

valid()

Is the current item of iteration valid?

Return type:bool

1143.1.1.13. createAddress

createAddress()

Create an address object

Parameters:
  • string
  • string|null
Return type:

Address