SMTP Activity Error

Hello,

I am trying to send a SMTP Mail message but I am encountering AuthenticationInvalidCredentials error even if my credentials are correct. No 2-step authentication set up and IMAP and POP is already enabled on my gmail settings. Here is the error I am encountering.

19.1.0+Branch.master.Sha.3db2bfe8751ed76c2c21f7ee16f53ff69a3e3b75

Source: Send SMTP Mail Message

Message: AuthenticationInvalidCredentials: 5.7.8 Username and Password not accepted. Learn more at
5.7.8 https://support.google.com/mail/?p=BadCredentials s1sm20711025pgv.30 - gsmtp

Exception Type: MailKit.Security.AuthenticationException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
MailKit.Security.AuthenticationException: AuthenticationInvalidCredentials: 5.7.8 Username and Password not accepted. Learn more at
5.7.8 https://support.google.com/mail/?p=BadCredentials s1sm20711025pgv.30 - gsmtp
at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @wonderingnoname,

Have a look at this
You can also enable “Less secure apps” (third-party mail clients) from:
"MyAccount" > “Sign-in & security” > “Connected apps & sites” > "Allow less secure apps"

Or
Can you double check the smtp and port number?

4 Likes

Hi @wonderingnoname,

as Haressh already mentioned you need to configure the “Allow less secure apps” and create an app-password (see here for details: https://support.google.com/mail/answer/185833?hl=en) in order to access the SMTP-service of Google.

3 Likes

@HareeshMR @FrankSchikora

thank you! That fixed the issue. :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.