Error in GetIMAP Activity

Hii, New For UiPath Studio.
I have to read the mail Message body content for that I used Get Imap Activity when set all properties,and added a secure password and mail password getting error.
please check Attached ScreenShot

@ashwini.mali

Provide password value either in password field or securepassword field but not in both…

Please open properties and delete one of the two field values

Hope this helps

Cheers

Try above solution but stiil getting error(Get IMAP Mail Messages: Invalid credentials (Failure))
Please check following attachment.

@ashwini.mali

As per error creds are wrong.I see you are using gmail

Check the following

  1. Port : 993
  2. Server : imap.gmail.com
  3. Secureconnection : tls
  4. Credentials provided are correct

Check if imap is enabled in gmail Check Gmail through other email platforms - Gmail Help

Cheers

thank you for support @Anil_G
As per above changes done but getting error (Get IMAP Mail Messages: The IMAP server has unexpectedly disconnected)
and which option select for Secure connection
Please check Attached Screen Shot

@ashwini.mali

Starttls is to be selected

Cheers

chenged as per above,
Source: Get IMAP Mail Messages

Message: The IMAP server has unexpectedly disconnected.

Exception Type: MailKit.Net.Imap.ImapProtocolException

@ashwini.mali

Can you please open exception details from locals panel and check it would have more info

And did you enable imap in gmail settings as well?

Cheers

Yess,Enable IMAP Gmail Setting,
Source: Get IMAP Mail Messages

Message: The IMAP server has unexpectedly disconnected.

Exception Type: MailKit.Net.Imap.ImapProtocolException

MailKit.Net.Imap.ImapProtocolException: The IMAP server has unexpectedly disconnected. at MailKit.Net.Imap.ImapStream.ReadAheadAsync(Int32 atleast, Boolean doAsync, CancellationToken cancellationToken) in D:\src\MailKit\MailKit\Net\Imap\ImapStream.cs:line 323
at MailKit.Net.Imap.ImapStream.ReadTokenAsync(String specials, Boolean doAsync, CancellationToken cancellationToken) in D:\src\MailKit\MailKit\Net\Imap\ImapStream.cs:line 698
at MailKit.Net.Imap.ImapEngine.ConnectAsync(ImapStream stream, Boolean doAsync, CancellationToken cancellationToken) in D:\src\MailKit\MailKit\Net\Imap\ImapEngine.cs:line 654
at MailKit.Net.Imap.ImapClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken) in D:\src\MailKit\MailKit\Net\Imap\ImapClient.cs:line 1486
at UiPath.Mail.MailServiceFactory.CreateMailKitService(EmailProtocol protocol, String server, Int32 port, UserSettings userSettings, SecureSocketOptions options, Int32 timeout, CancellationToken cancellationToken)
at UiPath.Mail.MimeMailService.GetIMAPMessages(UserSettings userSettings, ServerSettings serverSettings, Int32 top, String mailfolder, String filterExpression, String charset, EOrderByDate orderByDate, SecureSocketEncryption SecureConnection, Boolean deleteMessages, Boolean onlyUnreadMessages, Boolean markAsRead, Action1 logAction, CancellationToken cancellationToken)
at UiPath.Mail.IMAP.Activities.GetIMAPMailMessages.<>c__DisplayClass76_0.b__0()
at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback

Any One Can Help me to resolve issue

@ashwini.mali

Can you please slect auto instead of atarttls and try also increase the timeout and check

I hope you are using the gmail login pasword only

Cheers

Changed as per Above,but hetting error(et IMAP Mail Messages: Application-specific password required: Sign in with App Passwords - Google Account Help (Failure)
) how to increase timeout , where found the timeout section?

@ashwini.mali

Please get app password and try to use that…folow below to get app password

https://docs.uipath.com/installation-and-upgrade/docs/studio-enabling-gmail-for-email-activities

Cheers

get app password and add in secure password but still issue not resolved
Get IMAP Mail Messages: Invalid credentials (Failure)

@ashwini.mali

Are you usingn auto only? If auto does not work then try with sslonconnect

And use gmail password

Ideally imap uses gmail password only

Note: Tls which was mentioned preciously was wrong…please use ssl

Cheers

@ashwini.mali

Did the above changes resolve the issue?

Cheers

changes done as per above ,but issue not resolved

Hi,

You need to first create the App password in your Gmail account and use that 16-digit password in password property of Get IMAP mail activity. Watch below video to understand the process.
YouTube video: How to Generate Gmail App Password | Secure Google Account - YouTube

Also please enable IMAP in your Gmail Account.

as per above solution ,changes done but still same issue

try all solution but still issue not resolved