ConnectionInterface
interface ConnectionInterface (View source)
Methods
Open a new connection.
Close the current connection.
Determine if the current session is connected.
Send a "LOGIN" command.
Send a "LOGOUT" command.
Send an "AUTHENTICATE" command.
Send a "STARTTLS" command.
Send a "DONE" command.
Send a "NOOP" command.
Send a "EXPUNGE" command.
Send a "CAPABILITY" command.
Send a "SEARCH" command.
Send a "FETCH" command.
Send a "FETCH UID" command.
Send a "FETCH BODY[TEXT]" command.
Send a "FETCH BODY[HEADER]" command.
Send a "FETCH BODYSTRUCTURE" command.
Send a "FETCH BODY[i]" command.
Send a "FETCH FLAGS" command.
Send a "FETCH" command.
Send a "RFC822.SIZE" command.
Send an IMAP command.
Send a "SELECT" command.
Send a "EXAMINE" command.
Send a "LIST" command.
Send a "STATUS" command.
Send a "STORE" command.
Send a "APPEND" command.
Send a "UID COPY" command.
Send a "UID MOVE" command.
Send a "CREATE" command.
Send a "DELETE" command.
Send a "RENAME" command.
Send a "SUBSCRIBE" command.
Send a "UNSUBSCRIBE" command.
Send a "GETQUOTA" command.
Send a "GETQUOTAROOT" command.
Details
void
connect(string $host, int|null $port = null, array $options = [])
Open a new connection.
void
disconnect()
Close the current connection.
bool
connected()
Determine if the current session is connected.
TaggedResponse
login(string $user, string $password)
Send a "LOGIN" command.
Login to a new session.
void
logout()
Send a "LOGOUT" command.
Logout of the current server session.
TaggedResponse
authenticate(string $user, string $token)
Send an "AUTHENTICATE" command.
Authenticate the current session.
void
startTls()
Send a "STARTTLS" command.
Upgrade the current plaintext connection to a secure TLS-encrypted connection.
Generator
idle(int $timeout)
Send an "IDLE" command.
void
done()
Send a "DONE" command.
TaggedResponse
noop()
Send a "NOOP" command.
ResponseCollection
expunge()
Send a "EXPUNGE" command.
Apply session saved changes to the server.
UntaggedResponse
capability()
Send a "CAPABILITY" command.
Get the mailbox's available capabilities.
UntaggedResponse
search(array $params)
Send a "SEARCH" command.
Execute a search request.
UntaggedResponse
id(array|null $ids = null)
Send a "FETCH" command.
Exchange identification information.
ResponseCollection
uid(int|array $ids, ImapFetchIdentifier $identifier)
Send a "FETCH UID" command.
Fetch message UIDs using the given message numbers.
ResponseCollection
bodyText(int|array $ids, bool $peek = true)
Send a "FETCH BODY[TEXT]" command.
Fetch message text contents.
ResponseCollection
bodyHeader(int|array $ids, bool $peek = true)
Send a "FETCH BODY[HEADER]" command.
Fetch message headers.
ResponseCollection
bodyStructure(int|array $ids)
Send a "FETCH BODYSTRUCTURE" command.
Fetch message body structure.
ResponseCollection
bodyPart(string $partIndex, int|array $ids, bool $peek = false)
Send a "FETCH BODY[i]" command.
Fetch a specific part of the message BODY, such as BODY[1], BODY[1.2], etc.
ResponseCollection
flags(int|array $ids)
Send a "FETCH FLAGS" command.
Fetch a message flags.
ResponseCollection
fetch(array|string $items, array|int $from, mixed $to = null, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)
Send a "FETCH" command.
Fetch one or more items for one or more messages.
ResponseCollection
size(int|array $ids)
Send a "RFC822.SIZE" command.
Fetch message sizes for one or more messages.
void
send(string $name, array $tokens = [], string|null $tag = null)
Send an IMAP command.
ResponseCollection
select(string $folder)
Send a "SELECT" command.
Select the specified folder.
ResponseCollection
examine(string $folder)
Send a "EXAMINE" command.
Examine a given folder.
ResponseCollection
list(string $reference = '', string $folder = '*')
Send a "LIST" command.
Get a list of available folders.
UntaggedResponse
status(string $folder, array $arguments = ['MESSAGES', 'UNSEEN', 'RECENT', 'UIDNEXT', 'UIDVALIDITY'])
Send a "STATUS" command.
Get the status of a given folder.
ResponseCollection
store(array|string $flags, array|int $from, int|null $to = null, string|null $mode = null, bool $silent = true, string|null $item = null)
Send a "STORE" command.
Set message flags.
TaggedResponse
append(string $folder, string $message, array|null $flags = null)
Send a "APPEND" command.
Append a new message to given folder.
TaggedResponse
copy(string $folder, array|int $from, int|null $to = null)
Send a "UID COPY" command.
Copy message set from current folder to other folder.
TaggedResponse
move(string $folder, array|int $from, int|null $to = null)
Send a "UID MOVE" command.
Move a message set from current folder to another folder.
ResponseCollection
create(string $folder)
Send a "CREATE" command.
Create a new folder.
TaggedResponse
delete(string $folder)
Send a "DELETE" command.
Delete a folder.
TaggedResponse
rename(string $oldPath, string $newPath)
Send a "RENAME" command.
Rename an existing folder.
TaggedResponse
subscribe(string $folder)
Send a "SUBSCRIBE" command.
Subscribe to a folder.
TaggedResponse
unsubscribe(string $folder)
Send a "UNSUBSCRIBE" command.
Unsubscribe from a folder.
UntaggedResponse
quota(string $root)
Send a "GETQUOTA" command.
Retrieve quota information about a specific quota root.
ResponseCollection
quotaRoot(string $mailbox)
Send a "GETQUOTAROOT" command.
Retrieve quota root information about a mailbox.