[S22.Imap] Error while adding extension

[S22.Imap] Error while adding extension

  
Forge Component
(0)
Published on 14 Apr by Pedro Freire
0 votes
Published on 14 Apr by Pedro Freire

Hi,

I'm getting following error while trying to add this extension.


While publishing I am getting this error, Please let me correct if I'm doing wrong.


Thanks & Regards,

Gopal



Can you double-click on the error message and scroll down to see what's the problem, please?

I'm using Visual Studio 2017 Community Edition, and I have installed (just in case) the "S22.Imap" NuGet package beforehand. I anticipate you may have possible problems in one of these, but I'm not sure which one.

Hello Pedro,


Thank you for giving your time.

This is error I'm getting in compilation process,

S22_Imap -> C:\Users\SESA481009\AppData\Local\Temp\OutSystemsTemp\2018-01-05 14-16-57 9GVzs3dcHka_zDlD2CU7VQ\I1RGmgenEkuaOJ5BznI11g\Source\NET\bin\OutSystems.NssS22_Imap.dll
C:\Users\SESA481009\AppData\Local\Temp\OutSystemsTemp\2018-01-05 14-16-57 9GVzs3dcHka_zDlD2CU7VQ\I1RGmgenEkuaOJ5BznI11g\Source\NET\..\S22_Imap_Tester\S22_Imap_Tester.csproj.metaproj : error MSB3202: The project file "C:\Users\SESA481009\AppData\Local\Temp\OutSystemsTemp\2018-01-05 14-16-57 9GVzs3dcHka_zDlD2CU7VQ\I1RGmgenEkuaOJ5BznI11g\Source\NET\..\S22_Imap_Tester\S22_Imap_Tester.csproj" was not found.


Thanks In advance,

Gopal



Oh, my bad! That's something I forgot, but I can't quickly fix now.

The quickest fix is to open the component in Visual Studio (second button from the right in the toolbar, if I'm not mistaken) and select the main project in the solution that's opened as the "Start project". S22_Imap_Teste is a test application (poorly named, extra "e" at the end :-) ) that is not required to make the component work. I was expecting to include it with the component, though, but I forgot a step.

Let me know if it works after this.

Pedro Freire wrote:

Oh, my bad! That's something I forgot, but I can't quickly fix now.

The quickest fix is to open the component in Visual Studio (second button from the right in the toolbar, if I'm not mistaken) and select the main project in the solution that's opened as the "Start project". S22_Imap_Teste is a test application (poorly named, extra "e" at the end :-) ) that is not required to make the component work. I was expecting to include it with the component, though, but I forgot a step.

Let me know if it works after this.

Hi Pedro,

Thank you for the solution, I did the same and now I am able to publish extension. 

But while calling login action I am getting following error

S22_Imap Login action: * NO [WEBALERT https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbtLFQk5uMbgNt-WVsvfujqSRWFZuo1NB54uDW719GWWIuXz2idUkL3aqF_SPWOq9pQHXLNnxErCjXWFbIyFp9pLwystmIPYw2b4X1AjscP_Yzm3rYKpyzz3rmVXF974w1GNoaEQ0toagWNTzuTYGns6EgLTG6C_-Dp_SvhnndHsb9Iy_jEkfHowG-kIVJzETv8aA_kWNHX6sTDUOO_mWgpfKhcyCDchTsccp5-KWx5SSjb8_Mk] Web login required.


I am trying to add my Gmail account, I set Method property of login action to Auto. 


Please let me know what I am doing wrong


Regards,

Gopal


Helo Gopal,

My apologies for taking so long in replying to your question. The preview I got of your message ended in "I did the same and now I am able to publish extension.".

Your sequence of IMAP calls is correct. If you're getting that error, you're connecting correctly to the IMAP server. I haven't tested this with Gmail yet, but the error you get is some custom security request from Gmail. My guess is you need to create a special username+password for an external app to access your mailbox, or something to that effect.

Please search the Internet as this does not seem to be related to S22.Imap.

Thank you!

Going back to your question, I remember that accessing Google services in general requires human authorization. Google's login screen provides a special token that you then use to login to the service (in this case, IMAP). This is called OAuth, and Google uses version 2 of this protocol.

https://developers.google.com/gmail/api/auth/about-auth

OAuth2 is one of the login methods available in S22.Imap, but changing the login option is not enough. You'll have to create a redirect to Google and take some response back. Please read Google's document above to learn more.

Having said this... did you enable IMAP in Gmail's Settings screen? This might do away with the OAuth2 requirement.

Solution

Hi.


I was getting the same error mensioned above by user GPL

"S22_Imap Login action: * NO [WEBALERT https://accounts.google.com/signin/continue?....."

 retriving emails from gmail accout.


The only way I was able to solved this, was changing the permissions config of the google account.


Go to: https://myaccount.google.com/security#connectedapps

and Turn on: Allow less secure apps.


Dont forget also to enable IMAP access, inside gmail configuration page.


cheers

Solution

That sounds correct: "Allow less secure apps" probably makes "normal" username+password login available in that account's IMAP, besides OAuth.

Thank you for sharing!

Gonçalo Barata wrote:

Hi.


I was getting the same error mensioned above by user GPL

"S22_Imap Login action: * NO [WEBALERT https://accounts.google.com/signin/continue?....."

 retriving emails from gmail accout.


The only way I was able to solved this, was changing the permissions config of the google account.


Go to: https://myaccount.google.com/security#connectedapps

and Turn on: Allow less secure apps.


Dont forget also to enable IMAP access, inside gmail configuration page.


cheers


Hi guys,

Thanks for your reply. I will check your solutions :)