2016-06-27 6 views
1

私はimap.gmail.comに接続するためにPHPスクリプトを使用しています。有料のGoogleアプリアカウントを持っています。それは働いていたが、いくつかの時間後、私はそれが私は、ブラウザからログインすることが、私のCentsOSのVPSサーバーは、ブラウザのコマンドプロンプトのみ 接続エラー:IMAPサーバーで認証できません:[アラート]ウェブブラウザからログインしてください

私はMYDOMAINを使用していますを持っていない持っていると言い、次のエラー

  1. を取得しています.COM

    Fatal error: Uncaught exception 'ImapMailboxException' with message 'Connection error: Can not authenticate to IMAP server: [ALERT] Please log in via your web browser: https://support.google.com/mail/acco ' in /xxxxxx/classes/ImapMailbox.php:51 Stack trace: #0 /home/theluxla/public_html/_backoffice/mailpilot/classes/ImapMailbox.php(42): ImapMailbox->initImapStream() #1 /xxxxxx/classes/ImapMailbox.php(114): ImapMailbox->getImapStream() #2 /xxxxxx/mail.v3.php(28): ImapMailbox->searchMailbox('ALL') #3 {main} thrown in/xxxxx/classes/ImapMailbox.php on line 51

+1

エラーメッセージを検索しようとしましたか?クイック検索は、[この回答](http://stackoverflow.com/a/32239136/717088)に私を導いた - それらの提案を試しましたか? –

+1

セキュリティフラグです。この問題を解決する唯一の方法は、OAuthを使用することです。しかし、あなたのブラウザからログインし、ログインを承認するかどうかを確認することができます。 – Max

+0

まだ私の問題は解決されていません。 私は自分の問題について質問していましたが、いつも誰かが別のものにリダイレクトします – user2228601

答えて

4

Googleは私に答えた:

Thank you for your message. I understand you're having issues connecting your application with our IMAP server, I'll be happy to help. I didn't want to bother with a call this early, reason why, I'm sending this email instead In this case, it seems this error is related to the access to "Less secure apps" disabled for the user you're trying to connect via IMAP. Please follow these steps to solve this issue:

  1. In your Admin Console, follow the steps available at this support article https://support.google.com/a/answer/6260879?hl=en under the section "Enabling less secure apps to access accounts".

  2. Log in as the affected user and follow the steps to "Allow less secure apps to access your account" as described at this support article https://support.google.com/accounts/answer/6010255 . I hope this information is helpful. Your case will remain open for three business days and it will auto close if no reply is received. Feel free to reply to this message if you need more help, I'll be happy to continue assisting you.

Sincerely,

David

1

Gmailアカウント設定を変更する: -

IMAPを有効にする。

ステータス:IMAPが有効になっていますenter image description here

関連する問題