php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

OUTLOOK - connection setup failed

Open alexv96 opened this issue 2 years ago • 2 comments

Hi, I have been using the library since 2021 and I have not had any problems with connecting to outlook, the problem is that today the connection started to fail at about 00:25:00 in the night of January 18.

I have been using the application key since October and they haven't changed the password or anything for it to start failing. I use this through DB and commands so OAuth is not useful for me in these cases.

image

Attached are details of the functionalities that are being used:

PHP: 7.4
Laravel: 7
webklex/php-imap: "^2.4",
Debian: 10

And this is my connection process:

                $cm = new ClientManager([
                    'options' => [
                        'fetch' => \Webklex\PHPIMAP\IMAP::FT_PEEK,
                        'fetch_order' => 'desc',
                        'sequence' => \Webklex\PHPIMAP\IMAP::ST_UID,
                    ],
                ]);

                static::$client = $cm->make([
                    'host'          => $email->server,
                    'port'          => $email->port,
                    'protocol'      => $email->server_type,
                    'encryption'    => $email->encryption,
                    'validate_cert' => true,
                    'username'      => $email->email,
                    'password'      => $email->password,
                ]);

                dd(static::$client);
                echo (static::$client->connect() ? "\n Conecto ".$email->email ." el día " . Carbon::now() ."\n" : die("Error de conexión con $email->server"));
                // Revisamos la conexión
                $isActive = $this->checkConnection();
                if (!$isActive) {
                    dd('Conexion cerrada imposible conectar');
                }

alexv96 avatar Jan 18 '23 19:01 alexv96

@alexv96 I'm getting the same issue, Did you resolve this anyhow?

Dhavalptel avatar Feb 13 '23 10:02 Dhavalptel

@alexv96 I'm getting the same issue, Did you resolve this anyhow?

No, I read that with OAuth2 they can but the client didn't give me access to OAuth2 so I had to find a way in linux to capture emails with an email and redirect them to us, but they are temporary emails that are read and then deleted.

alexv96 avatar Feb 13 '23 14:02 alexv96