All Projects → Webklex → Php Imap

Webklex / Php Imap

Licence: mit
PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication process as well.

Labels

Projects that are alternatives of or similar to Php Imap

Twisted
Event-driven networking engine written in Python.
Stars: ✭ 4,442 (+7064.52%)
Mutual labels:  imap
Cypht
Cypht: Lightweight Open Source webmail written in PHP and JavaScript
Stars: ✭ 628 (+912.9%)
Mutual labels:  imap
Feeds2imap.clj
Pull RSS/Atom feeds to your IMAP folders with Clojure on JVM.
Stars: ✭ 31 (-50%)
Mutual labels:  imap
Neutron
Self-hosted server for the ProtonMail client
Stars: ✭ 452 (+629.03%)
Mutual labels:  imap
Mail
💌 Mail app for Nextcloud
Stars: ✭ 528 (+751.61%)
Mutual labels:  imap
Kanmail
📥 An email client that functions like a kanban board.
Stars: ✭ 833 (+1243.55%)
Mutual labels:  imap
Mailkit
A cross-platform .NET library for IMAP, POP3, and SMTP.
Stars: ✭ 4,477 (+7120.97%)
Mutual labels:  imap
Imapcopy
Recursively copy all e-mail messages and folders from one IMAP account to another.
Stars: ✭ 52 (-16.13%)
Mutual labels:  imap
Hydroxide
A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge
Stars: ✭ 578 (+832.26%)
Mutual labels:  imap
How to get emails imap tutorial
How to get emails including there attachments and how to extract various attributes from those emails. See https://youtu.be/zFEEGkvo6O8 for a more detailed information.
Stars: ✭ 30 (-51.61%)
Mutual labels:  imap
James Project
Emails at the heart of your business logic!
Stars: ✭ 485 (+682.26%)
Mutual labels:  imap
Deltachat Desktop
Email-based instant messaging for Desktop.
Stars: ✭ 526 (+748.39%)
Mutual labels:  imap
Docker Mailserver
Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container.
Stars: ✭ 8,115 (+12988.71%)
Mutual labels:  imap
Sieve
Sieve Script Editor
Stars: ✭ 452 (+629.03%)
Mutual labels:  imap
Imbox
Python IMAP for Human beings
Stars: ✭ 981 (+1482.26%)
Mutual labels:  imap
Greenmail
Official master for the Greenmail project
Stars: ✭ 424 (+583.87%)
Mutual labels:  imap
Imap
Object-oriented, fully tested PHP IMAP library
Stars: ✭ 678 (+993.55%)
Mutual labels:  imap
Gmail Imap Php
API to work with Gmail using IMAP built on top of Zend Imap Library
Stars: ✭ 60 (-3.23%)
Mutual labels:  imap
Node Imapnotify
Execute scripts on new messages using IDLE imap command
Stars: ✭ 38 (-38.71%)
Mutual labels:  imap
Nioimapclient
High performance, async IMAP client implementation
Stars: ✭ 28 (-54.84%)
Mutual labels:  imap

IMAP Library for PHP

Latest Version on Packagist Software License Build Status Total Downloads Hits

Description

PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication process as well. You can enable the php-imap module in order to handle edge cases, improve message decoding quality and is required if you want to use legacy protocols such as pop3.

Official documentation: php-imap.com

Laravel wrapper: webklex/laravel-imap

Table of Contents

Documentations

Basic usage example

This is a basic example, which will echo out all Mails within all imap folders and will move every message into INBOX.read. Please be aware that this should not be tested in real life and is only meant to gives an impression on how things work.

use Webklex\PHPIMAP\ClientManager;

$cm = new ClientManager('path/to/config/imap.php');

/** @var \Webklex\PHPIMAP\Client $client */
$client = $cm->account('account_identifier');

//Connect to the IMAP Server
$client->connect();

//Get all Mailboxes
/** @var \Webklex\PHPIMAP\Support\FolderCollection $folders */
$folders = $client->getFolders();

//Loop through every Mailbox
/** @var \Webklex\PHPIMAP\Folder $folder */
foreach($folders as $folder){

    //Get all Messages of the current Mailbox $folder
    /** @var \Webklex\PHPIMAP\Support\MessageCollection $messages */
    $messages = $folder->messages()->all()->get();
    
    /** @var \Webklex\PHPIMAP\Message $message */
    foreach($messages as $message){
        echo $message->getSubject().'<br />';
        echo 'Attachments: '.$message->getAttachments()->count().'<br />';
        echo $message->getHTMLBody();
        
        //Move the current Message to 'INBOX.read'
        if($message->move('INBOX.read') == true){
            echo 'Message has ben moved';
        }else{
            echo 'Message could not be moved';
        }
    }
}

Known issues

Error Solution
Kerberos error: No credentials cache file found (try running kinit) (...) Uncomment "DISABLE_AUTHENTICATOR" inside your config and use the legacy-imap protocol

Support

If you encounter any problems or if you find a bug, please don't hesitate to create a new issue. However please be aware that it might take some time to get an answer. Off topic, rude or abusive issues will be deleted without any notice.

If you need commercial support, feel free to send me a mail at [email protected].

A little notice

If you write source code in your issue, please consider to format it correctly. This makes it so much nicer to read
and people are more likely to comment and help :)

```php

echo 'your php code...';

```

will turn into:

echo 'your php code...'; 

Features & pull requests

Everyone can contribute to this project. Every pull request will be considered but it can also happen to be declined.
To prevent unnecessary work, please consider to create a feature issue
first, if you're planning to do bigger changes. Of course you can also create a new feature issue if you're just wishing a feature ;)

Change log

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].