-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
getMessage does not work anymore with UID #32
Comments
Hi @SDCRoman , $client->getFolder($data->folder)->query()->all()->get()->each(function($message) use($uid_to_be_found){
if ($message->uid == $uid_to_be_found){
var_dump($message);
}
}); 2.) Assuming you are using var_dump($client->getFolder($data->folder)->query()->getConnection()->getUid()); The difference between Best regrards, |
From my experience, Uid is not working because of a wrong loop inside
if you dump $uids, you get something like this: array:61 [▼ but the loop that searches for the uid is this
and should be
this way it finds the id from the list of uids. But then I get another error "no headers found". Best regards |
@mynamespace I was able to adjust the sort order by going into |
@SDCRoman thanks, I've already tried that (clearing config cache) without success :( |
@Webklex Thanks again for the fast reply. This way of getting the message seems to work. I tried to use this to change flags, but the behaviour is weird. It will change the flag, but when I try to change the flag of a second message it will unflag all other messages. For example I have 3 seen messages. I mark msg 1 as unseen. Now I have 2 seen and 1 unseen. When I try to mark the next msg I will have again 2 seen and 1 unseen, but I should have 2 unseen and 1 seen.
Also executing
I used Maybe I messed up here? That is how I create the Client:
EDIT It seems UID is not needed anymore? I manually changed the msgn to 1
But I can't get the message number, for me it is null:
Also EDIT I am using now a combination of other identifiers to select a message (messageId + subject). This works for me:
|
Hi @SDCRoman , I'm a bit out of ideas. The fact that the uid can be found if you extend the search criteria is beyond my understanding. I'm also not sure if this is a bug or some other strange behavior. Please feel free to add any new insights. Best regards, P.s.: is the used account used by any other application / client at the same time? Could they mess up the session (very unlikely - but currently my best guess). |
Thanks for the reply webklex. I am currently happy with my workaround. Actually it is even better to build your own id. I will update the topic if I find out why the issue happened. Maybe I messed something up. |
I have recently updated the package from v1.4 -> v.2.2
In v1.4 I had this code to get a certain message:
$message = $oClient->getFolder($data->folder)->getMessage($data->muid, $fetch_body=false, $fetch_flags=false);
I have updated the syntax for v2
$message = $oClient->getFolder($data->folder)->query()->getMessage($msgn=$data->muid, $fetch_body=false, $fetch_flags=false);
But I get always an error:
unique id not found
The UID is the position in the current folder. I check that the folder is correct. In my case
$data->folder
wasINBOX
.I tried using the message id, but this also did not work. I tried getting the number
getMessageNo
, but it isnull
for all of my messages.While I am here asking, what is the difference between
UID
andMsgn
?The text was updated successfully, but these errors were encountered: