Skip to content
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

Variable in Search not working. #533

Open
luggesexe opened this issue Feb 19, 2022 · 0 comments
Open

Variable in Search not working. #533

luggesexe opened this issue Feb 19, 2022 · 0 comments
Labels

Comments

@luggesexe
Copy link

luggesexe commented Feb 19, 2022

Q A
ddeboer/imap version 1.13.1
PHP version 8.0.15
IMAP provider Own Server

Summary

Variable in Search not working properly.

Current behavior

I am trying to fetch E-Mails with a specific Address, for that I am fetching all the Addresses in the Database and foreach' any to the specific Mailbox. When I manually input the Address, it works properly $search->addCondition(new Ddeboer\Imap\Search\Email\From('mail@mail.eu')); or $messages = $mailbox->getMessages(new RawExpression('From "mail@mail.eu"'));. When I input the Variable as Mail, all the Mailboxes-Messages are fetched [both in SearchExpression aswell as RawExpression].

$messages = $mailbox->getMessages(new RawExpression('From "'.$Email.'"'));
There is a SO-Post, that also did not work [https://stackoverflow.com/questions/5086362/using-variables-in-imap-search-criteria].

Expected behavior

Only the E-Mails with the specified Filter shall be visible.

Kind regards,
Lukas-Adrian

@luggesexe luggesexe added the bug label Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant