Skip to content

IMAP::FT_PEEK fetch option for version 2 #346

@ricuss

Description

@ricuss

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions