login about faq

When I try to authenticate with Chilkat IMAP, I get this failure:

ImapCmdResp: aaab NO [ALERT] Please log in via your web browser: http://support.google.com/mail/accounts/bin/answer.py?answer=78754 (Failure)

asked Feb 16 '15 at 09:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


Double-check your application to make sure the correct login/password is being passed to Chilkat.Imap.Login

Assuming it is correct, then the likely resolution is to configure your GMail account to "allow less secure apps": https://support.google.com/accounts/answer/6010255

In GMail terms, "less secure" means logging in with a login/password via SSL/TLS.

More secure means to use an OAuth2 access token, which can be done using Chilkat as shown in the examples:

http://www.example-code.com/csharp/imap_gmail_oauth2.asp

http://www.example-code.com/objc/imap_gmail_oauth2.asp

link

answered Feb 16 '15 at 09:11

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Here is my situation.

Initially gmail authentication through Chilkat failed and after analysing I found that I have to turn ON "allow less secure apps". Then the authentication succeeded. To avoid turning ON "allow less secure apps" in every gmail account, I followed solution provided in below link.

http://www.example-code.com/objc/imap_gmail_oauth2.asp

Steps followed:

1) We created a certificate file(.p12).

Through the service account(in developer console) and we have the service account email address as well.

2) I am able to generate accesstoken successfully.

NSString *accessToken = [http G_SvcOauthAccessToken: iss scope: scope subEmail: sub numSec: [NSNumber numberWithInt: numSec] cert: cert];

3) Connecting to "imap.gmail.com mail" server succeeded.

success = [imap Connect: @"imap.gmail.com"];

4) But when I try to authenticate to gmail account using any gmail ID the authentication fails.

success = [imap Login: @"user@your-domain.com" password: accessToken];

Below is the error message I get in imap.LastErrorText.

ChilkatLog:

Connect_Imap:

DllDate: Sep 21 2015
ChilkatVersion: 9.5.0.52
UnlockPrefix: Hello World
Architecture: Little Endian; 64-bit
Language: IOS Objective-C
VerboseLogging: 0
connectInner:
  connectToImapServer:
    hostname: imap.gmail.com
    port: 993
    socketOptions:
      SO_SNDBUF: 262752
      SO_RCVBUF: 131072
      TCP_NODELAY: 4
      SO_KEEPALIVE: 8
    --socketOptions
    ConnectionType: SSL/TLS
  --connectToImapServer
--connectInner
Success.

--Connect_Imap SendRawCommand:

Looks like an authenticate command...
getCompleteResponse:
  idleTimeoutMs: 60000
  tlsReadIncoming: Socket operation timeout.
  Failed to receive more TLS applicaton data.
  recvUntilMatch: Socket operation timeout.
  getImapResponseLine: Socket operation timeout.
  Failed to get next response line from IMAP server.
--getCompleteResponse
Looks like authentication was NOT successful..
Failed.

--SendRawCommand --ChilkatLog

link

answered Nov 24 '15 at 08:31

Pradeep's gravatar image

Pradeep
11

edited Nov 25 '15 at 07:22

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×174
×28
×28
×9
×6

Asked: Feb 16 '15 at 09:07

Seen: 1,572 times

Last updated: Nov 25 '15 at 07:22

powered by OSQA