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

keepUnseen not working correctly with Hotmail #84

Closed
zachnoren opened this issue May 28, 2015 · 8 comments
Closed

keepUnseen not working correctly with Hotmail #84

zachnoren opened this issue May 28, 2015 · 8 comments
Labels
Milestone

Comments

@zachnoren
Copy link

Trying to use the following sample code with hotmail:
$message->keepUnseen()->getBodyHtml();

It is not keeping the messages as unread. Tried forcing a boolean in keepUnseen
$message->keepUnseen(true)->getBodyHtml();

Did not work. Tried forcing the class variable to be true by default on line 21 of Message.php, This also did not work.

@ddeboer
Copy link
Owner

ddeboer commented May 28, 2015

Does Hotmail still exist? 😖

@zachnoren
Copy link
Author

Yes it does. Not my choice. I am just the dev that has to work with it :/

@ddeboer
Copy link
Owner

ddeboer commented May 28, 2015

I’m not sure why this wouldn’t work. Could you try to keep it unseen with PHP’s native IMAP functions?

@zachnoren
Copy link
Author

Will try that tonight. I just tried with Gmail and I was able to replicate the issue there too.

@ddeboer
Copy link
Owner

ddeboer commented May 28, 2015

Okay, let me know. We do have a test that should verify the keepUnseen behaviour on Gmail.

@zachnoren
Copy link
Author

An update: Just ran the unit tests. I had 13 exceptions all the same thing
"Ddeboer\Imap\Exception\MailboxDoesNotExistException: Mailbox [Gmail]/Bin does not exist"

But I did have a failure in the Mark Unseen Test

There was 1 failure:

  1. Ddeboer\Imap\Tests\MessageTest::testKeepUnseen
    Failed asserting that false is true.
    vendor/ddeboer/imap/tests/MessageTest.php:32
    vendor/phpunit/phpunit/src/TextUI/Command.php:153
    vendor/phpunit/phpunit/src/TextUI/Command.php:105

I tried this with my work email which is hosted with gmail. I will still try the PHP native functions later.

@zachnoren
Copy link
Author

More information:

I have managed to put in a work around by modifying the line 319 in Part.php
https://github.com/ddeboer/imap/blob/master/src/Message/Part.php#L319

protected function doGetContent($keepUnseen = true)

Forcing this true will keep the messages from being marked as read. Which works for my use case right now.

@Slamdunk Slamdunk added the bug label Sep 22, 2017
@Slamdunk Slamdunk added this to the 1.0 milestone Sep 29, 2017
@Slamdunk
Copy link
Collaborator

Solved by #95

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

3 participants