1830. Class

1830.1. Zend\Mail\Storage\Pop3

1830.1.1. Methods

1830.1.1.1. countMessages

countMessages()

Count messages all messages in current box

Return type:int number of messages
Throws :ZendMailStorageExceptionExceptionInterface
Throws :ZendMailProtocolExceptionExceptionInterface

1830.1.1.2. getSize

getSize()

get a list of messages with number and size

Parameters:int – number of message
Return type:int|array size of given message of list with all messages as array(num => size)
Throws :ZendMailProtocolExceptionExceptionInterface

1830.1.1.3. getMessage

getMessage()

Fetch a message

Parameters:int – number of message
Return type:ZendMailStorageMessage
Throws :ZendMailProtocolExceptionExceptionInterface

1830.1.1.4. getRawHeader

getRawHeader()

1830.1.1.5. getRawContent

getRawContent()

1830.1.1.6. __construct

__construct()

create instance with parameters Supported parameters are

  • host hostname or ip address of POP3 server
  • user username
  • password password for user ‘username’ [optional, default = ‘’]
  • port port for POP3 server [optional, default = 110]
  • ssl ‘SSL’ or ‘TLS’ for secure sockets
Parameters:$params – mail reader specific parameters
Throws ZendMailStorageExceptionInvalidArgumentException:
 
Throws ZendMailProtocolExceptionRuntimeException:
 

1830.1.1.7. close

close()

Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.

1830.1.1.8. noop

noop()

Keep the server busy.

1830.1.1.9. removeMessage

removeMessage()

Remove a message from server. If you’re doing that from a web environment you should be careful and use a uniqueid as parameter if possible to identify the message.

Parameters:int – number of message
Throws ZendMailProtocolExceptionRuntimeException:
 

1830.1.1.10. getUniqueId

getUniqueId()

get unique id for one or all messages

if storage does not support unique ids it’s the same as the message number

Parameters:int|null – message number
Return type:array|string message number for given message or all messages as array
Throws :ZendMailStorageExceptionExceptionInterface

1830.1.1.11. getNumberByUniqueId

getNumberByUniqueId()

get a message number from a unique id

I.e. if you have a webmailer that supports deleting messages you should use unique ids as parameter and use this method to translate it to message number right before calling removeMessage()

Parameters:string – unique id
Throws ExceptionInvalidArgumentException:
 
Return type:int message number

1830.1.1.12. __get

__get()

Special handling for hasTop and hasUniqueid. The headers of the first message is retrieved if Top wasn’t needed/tried yet.

Parameters:string
Return type:string