waiki
June 28, 2019, 8:54pm
#1
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
waiki:
CustomKeywords.‘com.testwithhari.katalon.plugins.Gmail.deleteAllEMails’(‘testpcprubicon@gmail.com’, ‘abc’, ‘Inbox’)
CustomKeywords.‘com.testwithhari.katalon.plugins.Gmail.deleteAllEMails’(‘testspecrubicon@gmail.com’, ‘abc’, ‘Inbox’)
Is this just a typo? Repeating the same line of code?
waiki
July 1, 2019, 6:49pm
#4
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 :
manpreet.mukkar:
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.