Download the PHP package rdx/imap without Composer
On this page you can find all versions of the php package rdx/imap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor rdx
Package imap
Short Description Reads and parses e-mail from an IMAP/POP3 source
License MIT
Package imap
Short Description Reads and parses e-mail from an IMAP/POP3 source
License MIT
Please rate this library. Is it a good library?
Informations about the package imap
IMAP reader
Reads e-mails on an IMAP server.
Features
- Retrieves message parts
- Recognizes PLAIN & HTML parts
- Recognizes attachments
Uses PHP's built in IMAP module.
Examples
Init connection & find messages:
$mbox = new rdx\imap\IMAPMailbox('example.com', 'user', 'password', 'INBOX', ['ssl', 'tls']);
$messages = $mbox->messages([
'newestFirst' => true, // bool
'seen' => false, // null|bool
'limit' => 10, // int
'offset' => 0, // int
]);
See a message's structure:
foreach ($messages as $message) {
echo $message->simpleStructure() . "\n\n";
// Could be something complex like:
// 1. PLAIN (517)
// 2. DELIVERY-STATUS (315)
// 3. *RFC822 (2446)
// 3.1. PLAIN (610)
// 3.2. HTML (744)
// Or something simple like:
// 1. PLAIN (123)
// 2. JPEG (76543)
}
Find all HTML parts, including attachments, forwards etc:
foreach ($messages as $message) {
$htmls = $message->html(true); // true for recursive, false for only top level parts
}
Read bounce mail to find rejected addresses:
foreach ($messages as $message) {
$body = $message->subtypeContent('DELIVERY-STATUS');
if ($body && strpos($body, 'failed') !== false) {
// Extract address and do something
}
}
Find ALL image attachments:
foreach ($messages as $message) {
$attachments = $message->subtypeParts(['JPEG', 'PNG', 'GIF'], true); // true = recursive
foreach ($attachments as $att) {
$att->saveAttachment('/some/folder');
}
}
All versions of imap with dependencies
PHP Build Version
Package Version
Requires
ext-imap Version
*
The package rdx/imap contains the following files
Loading the files please wait ....