To configure Gmail with OAuth2 in MyQ:
Log in to the MyQ web administrator interface, and go to MyQ, Settings, Connections.
Click +Add and select Gmail.
In the pop-up window, you are requested to authorize the connection by clicking Continue with Google, copying the generated code, pasting it in the Authorization code field, and clicking OK.
Gmail is now connected to MyQ and is ready to be used in the Network settings tab as an Outgoing SMTP server, and in the Jobs settings tab, in Jobs via Email as a POP3 or IMAP server.