Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP::FT_PEEK fetch option for version 2 #346

Closed
ricuss opened this issue Oct 7, 2020 · 2 comments
Closed

IMAP::FT_PEEK fetch option for version 2 #346

ricuss opened this issue Oct 7, 2020 · 2 comments

Comments

@ricuss
Copy link

ricuss commented Oct 7, 2020

Hi @Webklex

Thanks for your work on this package, it's really appreciated.

I'm upgrading our application to laravel 8 and noticed you had the new major version 2 available so thought I might as well see if I can upgrade to that while I'm busy.

I've noticed in the new config file that the fetch options isn't available anymore, has this been moved somewhere else?

My current (pre version 2 config)

    'options' => [
        'delimiter' => '/',
        'fetch' => \Webklex\IMAP\IMAP::FT_PEEK,
        'fetch_body' => true,
        'fetch_attachment' => true,
        'fetch_flags' => true,
        'message_key' => 'id',
        'fetch_order' => 'desc',
        'open' => [
            // 'DISABLE_AUTHENTICATOR' => 'GSSAPI'
        ],
        'decoder' => [
            'message' => [
                'subject' => 'utf-8', // mimeheader
            ],
            'attachment' => [
                'name' => 'utf-8', // mimeheader
            ],
        ],
    ],

I'm specifically referring to to the fetch option which is set to FT_PEEK to not mark the message as read on the server.

From the old config:

    |   -Fetch option:
    |       IMAP::FT_UID  - Message marked as read by fetching the message
    |       IMAP::FT_PEEK - Fetch the message without setting the "read" flag

In the new config stub this option / comment has been completely removed.

How can I still ensure that when we retrieve emails from the mail server that it doesn't mark it as read with this option gone?

Thanks in advance

@Webklex
Copy link
Owner

Webklex commented Oct 8, 2020

Hi @ricus-zero2one ,
thanks for your report. Please update the "webklex/php-imap" dependency to the latest version. I've just released a patch to re-enable this behavior and functionality.

Best regards,

@ricuss
Copy link
Author

ricuss commented Oct 9, 2020

Thanks @Webklex I'll give it a try a bit later on. Much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants