Comments (7)
I have the Same Problem (sometimes the authentification takes too Long)
Would vote for it (if the Library has this feature)
Am 15.07.2015 um 06:28 schrieb Ionel Roiban [email protected]:
Would it be possible to setup a timeout on
$connection = $server->authenticate('my_username', 'my_password');
Sometimes (and no idea why) it takes too long to authenticate and I'd rather retry. How do I stop (and debug) php when doing imap_open. Code snippet from /ddeboer/imap/blob/master/src/Server.php below:public function authenticate($username, $password) { // Wrap imap_open, which gives notices instead of exceptions set_error_handler( function ($nr, $message) use ($username) { throw new AuthenticationFailedException($username, $message); } ); $resource = imap_open( $this->getServerString(), $username, $password, null, 1, $this->parameters ); if (false === $resource) { throw new AuthenticationFailedException($username); } restore_error_handler(); $check = imap_check($resource); $mailbox = $check->Mailbox; $this->connection = substr($mailbox, 0, strpos($mailbox, '}')+1); // These are necessary to get rid of PHP throwing IMAP errors imap_errors(); imap_alerts(); return new Connection($resource, $this->connection); }
—
Reply to this email directly or view it on GitHub.
from imap.
It seems this can be done with imap_timeout. Do you feel like opening a PR?
from imap.
Maybe i will create one in a few hours.
Am 15.07.2015 um 20:39 schrieb David de Boer [email protected]:
It seems this can be done with imap_timeout. Do you feel like opening a PR?
—
Reply to this email directly or view it on GitHub.
from imap.
Cool!
On Wed, Jul 15, 2015 at 8:42 PM, Pascal Krason [email protected]
wrote:
Maybe i will create one in a few hours.
Am 15.07.2015 um 20:39 schrieb David de Boer [email protected]:
It seems this can be done with imap_timeout. Do you feel like opening a PR?
—
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub:
#90 (comment)
from imap.
Hi do you already have a solution for this? I'm having the same problem for this.
from imap.
no solution other than to monitor the process and stop if trying to connect runs for too long
from imap.
Hi, to me this doesn't seem an issue related to the library, and I can't figure out how we can help to face it.
As said, you can try using imap_timeout which sets global configuration for all imap functions, and so you don't have to wait we implement it to use it.
from imap.
Related Issues (20)
- Is there a way to fetch only not replied messages? HOT 4
- Google imap no longer supports username and password authentication. HOT 1
- Oauth2 problem HOT 1
- Supplied resource is not a valid imap resource HOT 1
- Wrong post
- imap_sort(): Argument #3 ($reverse) HOT 1
- mb_convert_encoding(): Illegal character encoding specified HOT 4
- Backporting https://github.com/ddeboer/imap/pull/546 to PHP7.4 HOT 1
- Is there any way to add multiple 'oRcondition' in SearchExpression with From Address HOT 1
- Running into intermittent "Cannot reopen mailbox XYZ" HOT 2
- PHP 8.2 compatibility HOT 2
- Imap Codeigniter 4 HOT 2
- Can't retrieve headers from RFC822-HEADERS subpart HOT 2
- output abort message
- Move message to another account HOT 3
- Crash getting message sequence with error: Mailbox has more messages HOT 3
- $bytes must not be accessed before initialization
- getMailboxes() is trying to open a non-mailbox folder resulting in a "cannot reopen" error. HOT 1
- SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports
- Authentication failed: [E_WARNING] Authentication failed for user "[email protected]": imap_open(): Couldn't open stream {imap.gmail.com:993/ssl} imap_alerts (0): imap_errors (1): - Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imap.