Mail/Protocol/Pop3.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mail
- Subpackage
- Protocol
- Version
- $Id$
\Zend_Mail_Protocol_Pop3
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
Methods
__construct(string $host = '', int | null $port = null, bool | string $ssl = false) : void
Public constructor
Name | Type | Description |
---|---|---|
$host | string | hostname or IP address of POP3 server, if given connect() is called |
$port | int | null | port of POP3 server, null for default (110 or 995 for ssl) |
$ssl | bool | string | use ssl? 'SSL', 'TLS' or false |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
capa() : array
Get capabilities from POP3 server
Type | Description |
---|---|
array | list of capabilities |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
connect(string $host, int | null $port = null, string | bool $ssl = false) : string
Open connection to POP3 server
Name | Type | Description |
---|---|---|
$host | string | hostname or IP address of POP3 server |
$port | int | null | of POP3 server, default is 110 (995 for ssl) |
$ssl | string | bool | use 'SSL', 'TLS' or false |
Type | Description |
---|---|
string | welcome message |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
delete( $msgno) : null
Make a DELE count to remove a message
Name | Type | Description |
---|---|---|
$msgno |
Type | Description |
---|---|
null |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
getList(int | null $msgno = null) : int | array
Make LIST call for size of message(s)
Name | Type | Description |
---|---|---|
$msgno | int | null | number of message, null for all |
Type | Description |
---|---|
int | array | size of given message or list with array(num => size) |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
login(string $user, string $password, $tryApop = true) : void
Login to POP3 server. Can use APOP
Name | Type | Description |
---|---|---|
$user | string | username |
$password | string | password |
$tryApop |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
noop() : null
Make a NOOP call, maybe needed for keeping the server happy
Type | Description |
---|---|
null |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
readResponse(boolean $multiline = false) : string
read a response
Name | Type | Description |
---|---|---|
$multiline | boolean | response has multiple lines and should be read until " |
Type | Description |
---|---|
string | response |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
request(string $request, bool $multiline = false) : string
Send request and get resposne
Name | Type | Description |
---|---|---|
$request | string | request |
$multiline | bool | multiline response? |
Type | Description |
---|---|
string | result from readResponse() |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
retrieve(int $msgno) : string
Make a RETR call for retrieving a full message with headers and body
Name | Type | Description |
---|---|---|
$msgno | int | message number |
Type | Description |
---|---|
string | message |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
retrive(int $msgno) : string
Make a RETR call for retrieving a full message with headers and body
Name | Type | Description |
---|---|---|
$msgno | int | message number |
Type | Description |
---|---|
string | message |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
- Deprecated
- since 1.1.0; this method has a typo - please use retrieve()
sendRequest(string $request) : null
Send a request
Name | Type | Description |
---|---|---|
$request | string | your request without newline |
Type | Description |
---|---|
null |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
status(int $messages, int $octets) : void
Make STAT call for message count and size sum
Name | Type | Description |
---|---|---|
$messages | int | out parameter with count of messages |
$octets | int | out parameter with size in octects of messages |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
top(int $msgno, int $lines = 0, bool $fallback = false) : string
Make TOP call for getting headers and maybe some body lines This method also sets hasTop - before it it's not known if top is supported
Name | Type | Description |
---|---|---|
$msgno | int | number of message |
$lines | int | number of wanted body lines (empty line is inserted after header lines) |
$fallback | bool | fallback with full retrieve if top is not supported |
Type | Description |
---|---|
string | message headers with wanted body lines |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
undelete() : null
Make RSET call, which rollbacks delete requests
Type | Description |
---|---|
null |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |
uniqueid(int | null $msgno = null) : string | array
Make UIDL call for getting a uniqueid
Name | Type | Description |
---|---|---|
$msgno | int | null | number of message, null for all |
Type | Description |
---|---|
string | array | uniqueid of message or list with array(num => uniqueid) |
Exception | Description |
---|---|
\Zend_Mail_Protocol_Exception |