Question

Unable to send email from activity

Hi All,

I have requirement to send email from the activity, for that I have created email account (test connectivity is successful), now I am calling SendEmailNotification from my activity, I am passing all the required parameter to activity.

While executing activity I am getting error:

Unable to connect email client due to : 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8  https://support.google.com/mail/?p=BadCredentials 44sm11430557qtt.13 - gsmtp

Can some one please help me?

I am using pega 8.1 version

Comments

Keep up to date on this post and subscribe to comments

October 15, 2019 - 6:19am

Hello, 

Is the test connectivity fully working on your email account?

Pega
October 15, 2019 - 6:23am

Hi Tushar,

Google now doesn’t accept login from less secure apps. So you need to go to https://myaccount.google.com/security scroll to the bottom and turn ON “Allow less secure apps: ON”.
If it was enabled, change to disabled and than back to enable.
For more information check out the below link:
https://www.google.com/settings/security/lesssecureapps
https://stackoverflow.com/questions/23137012/535-5-7-8-username-and-password-not-accepted
https://www.digitalocean.com/community/questions/unable-to-send-mail-through-smtp-gmail-com

Hope it helps.

Pega
October 16, 2019 - 12:55am

Hi,

Please check the password and the username that you have passes as  parameters to the SendEmailNotification activity. The password should be the 16 digit app password that you generate and specify in the Email account configuration.

Regards,