GithubHelp home page GithubHelp logo

kirilkirkov / php-imap-messages-fetcher Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 18.0 11 KB

Retrieve messages from an IMAP server (get messages from gmail inbox)

PHP 100.00%
php-imap imap-server retrieve-messages gmail-inbox imap imap-library imap-php imap-protocol imap-application mail-parser

php-imap-messages-fetcher's Introduction

PHP IMAP

Retrieve messages from an IMAP server

Usage example:

$imap = new Imap();
$connection_result = $imap->connect('{imap.gmail.com:993/imap/ssl}INBOX', '[email protected]', 'password');
    if ($connection_result !== true) {
        echo $connection_result; //Error message!
        exit;
    }
$messages = $imap->setLimit(10)->getMessages('text', 'asc'); // Return array of messages. Second parameter is for type of sort desc|asc

in $attachments_dir property set directory for attachments

in the __destructor set errors log file

If you use gmail must allow - https://support.google.com/accounts/answer/6010255?hl=en

Dependencies

php-imap
Installations:
MacOS: brew install kabel/php-ext/[email protected] (php 7.2 in this example)
Ubuntu: sudo apt install php7.2-imap

Donate

If this project help you reduce time to develop, you can give me a cup of coffee to continue its development. Thank you! :) Donate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.