Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29762

Certificate Failure in IMAP using PHP

$
0
0

So i've been working in a simple email client but I'm unable to pass the certification tests. I'm using ddeboer library (https://github.com/ddeboer/imap). Here's how my code looks like:

use Ddeboer\Imap\Server;

   $server = new Server('outlook.office365.com');

   //I also tried outlook.office365.com:993/imap/ssl/novalidate-cert 
   //like other answers in other questions like this

   $connection = $server->authenticate('myemail@hotmail.com', 'mypass');

   $mailboxes = $connection->getMailboxes();

foreach ($mailboxes as $mailbox) {
    // Skip container-only mailboxes
    // @see https://secure.php.net/manual/en/function.imap-getmailboxes.php
    if ($mailbox->getAttributes() & \LATT_NOSELECT) {
        continue;
    }

    // $mailbox is instance of \Ddeboer\Imap\Mailbox
    printf('Mailbox "%s" has %s messages', $mailbox->getName(), $mailbox->count());
}

And I'm getting a certification error:

Certificate failure for outlook.office365.com: unable to get local issuer certificate: /C=US/O=DigiCert Inc/CN=DigiCert Cloud Services CA-1

Obs. I get this error with any email server that I try to use...

Any idea??


Viewing all articles
Browse latest Browse all 29762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>