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

Make sure imap connection are reopened #79

Merged
merged 1 commit into from
Mar 20, 2015
Merged

Conversation

joserobleda
Copy link
Contributor

If you leave the connection open, for example in a cli script, the imap_check returns false sometimes. This makes sure the connection are reopened.

ddeboer added a commit that referenced this pull request Mar 20, 2015
Make sure imap connection are reopened
@ddeboer ddeboer merged commit e816ad2 into ddeboer:master Mar 20, 2015
@ddeboer
Copy link
Owner

ddeboer commented Mar 20, 2015

Thanks!

@joserobleda
Copy link
Contributor Author

You're welcome. The bad news there is still other problems if the resource is missing... I let you know if I have more info.

@joserobleda
Copy link
Contributor Author

Well.. the thing, I think is:

$this->connection->getResource() returns an invalid resource (or something like that, I'm not sure)
and that triggers the error PHP Warning: imap_reopen(): Couldn't re-open stream in /vagrant/vendor/ddeboer/imap/src/Mailbox.php on line 140

In this scenario I think we need to call imap_open again... What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants