Closed igmacedo closed 3 years ago
This can help to contextualize the issue: https://developers.google.com/gmail/imap/imap-extensions#access_to_the_gmail_unique_message_id_x-gm-msgid
Hi @igmacedo ,
many thanks for your excellent and well researched issue report! Unfortunately this is the wrong repository. The responsible repository is webklex/php-imap
. This repository is "just" a wrapper.
Please go ahead and create a new issue over there: https://github.com/Webklex/php-imap/issues/new?assignees=&labels=&template=bug_report.md.
Best regards & thanks again,
@Webklex The problem was resolved in: https://github.com/Webklex/php-imap/issues/176 but the update does not work with Laravel-imap. Is it possible to update or do I even need to use the pure php library?
Hi @igmacedo ,
in general webklex/php-imap
v3.0.0-alpha is compatible with webklex/laravel-imap
. However it is currently limited by the ^2.4
constraint, which prevents an upgrade above or egal to 3.0.0.
You can get around it with something like this inside your composer.json
:
{
"name": "webklex/test",
"type": "project",
"require": {
"webklex/laravel-imap": "^2.4",
"webklex/php-imap": "3.0.0-alpha as 2.7.2"
},
"authors": [
{
"name": "John Smith",
"email": "john@example.com"
}
]
}
Of course you could use webklex/php-imap
as a standalone. webklex/laravel-imap
just provides a handy wrapper (such as a provider and facade) to it :)
Best regards,
Messages are loaded but cannot be searched individually, the problem is with the UID, although it is removed from the inbox, when searching the message it is not found and this is not related to the fact that the identifier is dynamic. Messages with a low UID like 200 return the wrong content and messages with a high UID like 200,000, which is what I'm looking for, are not found, all the ids are wrong and that only happens with Gmail.
The method below returns null:
\Webklex\IMAP\Facades\Client::account('default')->connect()->getFolders()->all()[0]->query()->where('uid', $uid)->limit(1)->get()
This other method returns: "unique id not found"
\Webklex\IMAP\Facades\Client::account('default')->connect()->getFolder('INBOX')->query()->getMessage($uid);
The UID exists, it is returned in the input box with the following code using foreach:
\Webklex\IMAP\Facades\Client::account('default')->connect()->getFolder('INBOX')->messages()->all()->setFetchBody(false)->paginate();
Also, a date lookup was attempted instead of the UID, however the date lookup returns the wrong message and the documentation deviates from the pattern used, the headers return something like "2021-10-22 23:15:04" and not "2021.10. 22" as suggested in the examples.What do you suggest to solve the problem?
This has been seen, tested and does not solve: https://github.com/Webklex/laravel-imap/issues/157