0
私はGmailに接続するためにこのrepoを使用しています。しかし、そのエラーを取得します。私は誰かがこれを最近経験したことを願っています。PHP Gmail IMAP接続の失敗
<?php
namespace program;
require_once "php-imap-client/vendor/autoload.php";
use SSilence\ImapClient\ImapClientException;
use SSilence\ImapClient\ImapConnect;
use SSilence\ImapClient\ImapClient as Imap;
$mailbox = 'imap.gmail.com';
$username = '[email protected]';
$password = "wonderland";
$encryption = Imap::ENCRYPT_SSL;
// Open connection
try{
$imap = new Imap($mailbox, $username, $password, $encryption);
// You can also check out example-connect.php for more connection options
}catch (ImapClientException $error){
echo $error->getMessage().PHP_EOL;
die(); // Oh no :(we failed
}
それはどのようなエラーを得ていますか? – Goose
errflag = 1で、143ポートを使用するための暗号化を回避し、errflag = 2を取得しました。 – observo
errflag?私はそれが何であるか分からない。 'error-> getMessage()'とは何ですか? – Goose