Open
Description
Documentation says:
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?