Gmail plugin getting authenication error

javax.mail.AuthenticationFailedException: [AUTHENTICATIONFAILED] Invalid credentials (Failure)

code used:
// It deletes all the emails in the given Emailbox folder

CustomKeywords.‘com.testwithhari.katalon.plugins.Gmail.deleteAllEMails’(‘testpcprubicon@gmail.com’, ‘abc’, ‘Inbox’)

CustomKeywords.‘com.testwithhari.katalon.plugins.Gmail.deleteAllEMails’(‘testspecrubicon@gmail.com’, ‘abc’, ‘Inbox’)

please let me know how to setup gmail account or if I can use a different custom keyword.

@waiki Are you sure you are sending correct credentials for Gmail to authnticate?

There is also a note :

Make sure that in the Gmail account you are using with this plugin, “Less secure app access” option is enabled. If this option is not enabled, it throws “username and password is not accepted” error message.

@waiki

Is this just a typo? Repeating the same line of code?

this is working after setup less secure app access is enabled in my gmail account.

1 Like

Yupp that is mentioned on the plugin page as well :