require_once __DIR__ . '/vendor/autoload.php'; use Horde\NLS\NLS; use Horde\Util\StringUtil; use IMP\Mailbox; $inbox = IMP\Mailbox::get('username', 'password', 'server', 'mailbox'); $messages = $inbox->listMessages(); foreach ($messages as $message) { $subject = NLS::gettext(StringUtil::truncate($message->getSubject(), 72)); echo "$subject
"; }
getEvents($start, $end); foreach ($events as $event) { echo $event->getTitle() . "\n"; echo $event->getDate() . "\n"; echo $event->getDescription() . "\n"; }
search('John', ['name']); foreach ($contacts as $contact) { echo $contact->getName() . "\n"; echo $contact->getEmail() . "\n"; }In conclusion, PHP Horde consists of a variety of packages that provide web-based productivity tools. These examples demonstrate the usage of three different packages - IMP, Kronolith, and Turba - and showcase features such as retrieving emails, managing calendar events, and searching contacts.