Your first big clue to the problem is shown in your list of the Gmail App Passwords. I do not know your language, so I looked at my Gmail account to understand what you are showing. Your App Password named Grandstream has never been used. That is the first problem for you to solve.
The two most likely problems are:
1a. The UCM email settings need to be using a mail client and not sending the email messages directly.
1b. Something is mis-spelled in the settings for the UCM’s email. It could be either the User Name or the Password. For those fields I prefer to do a Copy & Paste instead of typing by hand.
2. Something in your router or firewall is blocking the UCM from talking to Gmail.
As soon as you get the UCM to log into your Gmail account then you will see in the Gmail account that the App Password named Grandstream has been used. After that you can proceed with making sure the server & port are correct.
When the UCM has an outgoing email message that has a status of deferred, then the UCM will try to send that message again, I think around 25 attempts. You can click on the little Information button on that message to see the activity. When you get the UCM email to work then you may get a bunch of those deferred messages that are finally sent out.
Rick