Also if you are using gmail you need to enable less secure app for gmail to use IMAP.

I don't suggest to customers to enable in Gmail less secure apps.

As the Google guide say

less secure apps can make your account more vulnerable

Instead of enable this that for security, on my opinion is better use the two factor authentication than generate and use in UVdesk a specific password for app.

Security, should be the priority.
If you allow less secure apps means you have no good Google security settings and your account may be vulnerable for hacker but also if you forget the password or try to login from a new device. You can be locked out of your account.

@parvinder I don't suggest to keep less secure app active in your Google account.
I also suggest to have always the 2 step active and to be sure to have full recovery info always updated on your account, not just the recovery email.