GithubHelp home page GithubHelp logo

Comments (12)

Webklex avatar Webklex commented on August 15, 2024

Hi @dansleboby ,
are you using version 1.0.3.0? If not please update to version 1.0.3.0 and try again :)

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

How I can check the version? I have this in my composer.json
"webklex/laravel-imap": "^1.0",

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

I found :)

php composer.phar show webklex/laravel-imap

webklex/laravel-imap 1.0.3.0 Laravel IMAP client

from laravel-imap.

Webklex avatar Webklex commented on August 15, 2024

Perfect,
I did some research in the meantime and created a patch. Please update to version 1.0.3.1 and let me know if it helped. If not please provide the full error stack.

Ref. to new version: 1.0.3.1

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

Same error :\

My code:

        $oClient = IMAPClient::account('default');

        $oClient->connect();
        //Get all Mailboxes
        $aMailboxes = $oClient->getFolders(false);

        //Loop through every Mailbox
        /** @var \Webklex\IMAP\Folder $oMailboxes */
        foreach ($aMailboxes as $oMailboxes) {
            if ($oMailboxes->fullName == "INBOX") {
                //Get all Messages of the current Mailbox
                /** @var \Webklex\IMAP\Message $oMessage */
                foreach ($oMailboxes->getMessages() as $oMessage) {//Here is fails

If can help you here is FULL TRACE

Webklex\IMAP\Exceptions\GetMessagesFailedException imap_fetchheader(): Bad message number 
    vendor/webklex/laravel-imap/src/IMAP/Client.php:306 Webklex\IMAP\Client::getMessages
    vendor/webklex/laravel-imap/src/IMAP/Folder.php:148 Webklex\IMAP\Folder::getMessages
    app/Http/Controllers/EmailsController.php:129 App\Http\Controllers\EmailsController::cron
    [internal] call_user_func_array
    vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55 Illuminate\Routing\Controller::callAction
    vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44 Illuminate\Routing\ControllerDispatcher::dispatch
    vendor/laravel/framework/src/Illuminate/Routing/Route.php:203 Illuminate\Routing\Route::runController
    vendor/laravel/framework/src/Illuminate/Routing/Route.php:160 Illuminate\Routing\Route::run
    vendor/laravel/framework/src/Illuminate/Routing/Router.php:572 Illuminate\Routing\Router::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 Illuminate\Routing\Middleware\SubstituteBindings::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:65 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 Illuminate\View\Middleware\ShareErrorsFromSession::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 Illuminate\Session\Middleware\StartSession::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59 Illuminate\Cookie\Middleware\EncryptCookies::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 Illuminate\Pipeline\Pipeline::then
    vendor/laravel/framework/src/Illuminate/Routing/Router.php:574 Illuminate\Routing\Router::runRouteWithinStack
    vendor/laravel/framework/src/Illuminate/Routing/Router.php:533 Illuminate\Routing\Router::dispatchToRoute
    vendor/laravel/framework/src/Illuminate/Routing/Router.php:511 Illuminate\Routing\Router::dispatch
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 Illuminate\Foundation\Http\Middleware\TransformsRequest::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30 Illuminate\Foundation\Http\Middleware\TransformsRequest::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 Illuminate\Foundation\Http\Middleware\ValidatePostSize::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::handle
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:148 Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}
    vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 Illuminate\Routing\Pipeline::Illuminate\Routing\{closure}
    vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102 Illuminate\Pipeline\Pipeline::then
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter
    vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 Illuminate\Foundation\Http\Kernel::handle
    public/index.php:53 [main]

from laravel-imap.

Webklex avatar Webklex commented on August 15, 2024

Hmm if you dump $this->uid in \Webklex\IMAP\Message.php:130 does it contain any chars or is it null?

..hasn't it worked before (I just noticed you pushed a merge request in feb. this year)? Did you changed your Mailserver / Provider?

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

I don't change my provider, it microsoft

I put a loggin on this value, this error apper randomly, I will give you information when the error reappear :)

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

$this->uid = (int) 1

$uid => int(105567)

I got log for 178 requests

This is how I log result

image

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

Hi,
Do you have an idea?

from laravel-imap.

Webklex avatar Webklex commented on August 15, 2024

Hi,
not really. I did some more research and stumbled upon some discussions which seem to have the same problem. So it could be a broken message / a misconfigured mail server or a filthy php version.

Ref.:
ddeboer/imap#26
https://marc.info/?l=imp&m=109326277115553&w=2

from laravel-imap.

Webklex avatar Webklex commented on August 15, 2024

Hi @dansleboby ,
have you figured it out?

from laravel-imap.

dansleboby avatar dansleboby commented on August 15, 2024

No :( Finalley I choose GRAPH api from microsoft, because the email I try to sync is an Office 365

from laravel-imap.

Related Issues (20)

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.