Hi there,
Thank you for this guide.
This may sound a bit obvious, but for the more distracted folks, like myself, you need to enable access for less secure apps in the Google account, or else Gmail will refuse the connection.
I fumbled around with the --send-mail settings of Duplicati for a couple of hours, pulling my hairs, before I remembered that I needed to do that.