Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to query by messageId()? #82

@Arkemlar

Description

@Arkemlar

Documentation says:

Image

And signature of find is:

    public function find(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid): ?MessageInterface;

Message class provides two methos:

$message->uid(); // int
$message->messageId(); // ?string

If I call $uid = $message->uid() then I can call $query->find($uid).
But if I call $messageId = $message->messageId() then I can NOT call $query->find($messageId) - $messageId is a string and find() accepts int and there are no ImapFetchIdentifier::MessageId enum case.

Actually, this is sort of confusing for me:

  • $message->uid() is int and matches with $query->find($uid, ImapFetchIdentifier::Uid) both by type and by name
  • $message->messageId() has no matching query filter
  • $query->find($messageId, ImapFetchIdentifier::MessageNumber) has no matching method in Message class.

I was thinking that messageId and MessageNumber is same thing but after googling I realized it is not.

So. How do I query message by messageId?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions