How to send Gmail with strong security account?

I am having a hard time finding a way to send email from a Gmail account that has strong security.
I have a Gmail account used in my company. We cannot simply log in to this account from page. We first have to visit a website interface created by our company, where we need to log in with a user name and a password. And then, there is a 2-factor authentication, where we need to select right images in a certain order. Kind of looks like the 2nd password.

Once these are all passed, we can access our Gmail.
Now, we need to have UiPath send an email from one of these Gmail accounts, and I am using Send SMTP Mail Message activity, but I have been getting error:

"Send SMTP Mail Message: 535: 5.7.8 Username and Password not accepted. Learn more at 5.7.8"

I found that this can be solved by allowing “Less Secure App” to access gmail account from the account security setting. So I enabled less secure app too.

However, the same problem persists.
Is there any way to do this?


Check if you are using the correct parameters in this post:

Best Regards

Hi thanks for the reply.

Actually yes. I am using the right parameters.
I know that because when I test with my personal Gmail account that doesn’t have the strong security like my company’s, it works fine and it sends emails.
However, when I use my company’s email address, it doesn’t work.

I don’t think this is the parameters.
I might need a different workaround…