Gmail automatically disables "Access for less secure apps" after inactivity period

I’m using Duplicati to send backups to Google Drive and it works fine.
The problem I have is when I send a notification in case of an error: Gmail disables the option “Access for less secure apps” after inactivity period
so in case of backup problem (which is rare), gmail blocks sending notification mail
can u help to find workaround (certificate setup…)

----------------- send-mail parametres --------------------
–send-mail-subject=%PARSEDRESULT% : %OPERATIONNAME% report for %backup-name%

Less secure apps & your Google Account gives Google’s advice on what to do instead. One option is:

Sign in using App Passwords but in order to do that you first have to set up (and deal with) this option:

Turn on 2-Step Verification

App passwords at least avoid having to put the same general-purpose password in all your programs.

Long term, I think their goal is to push everybody to OAuth 2.0. Duplicati uses that for its Google Drive.

How we get along with OAuth

Duplicati OAuth Handler shows which supported cloud destinations use OAuth 2.0, but it’s for backup.
Extending it into the email space would probably take some doing. Many email clients don’t do it either. Thunderbird is reported to be able to do it. Some people have found hacks to get it to email from CLI…

Another workaround might be to send mail through some other provider. Does it HAVE to be by gmail?