Closed favonia closed 8 months ago
Currently, sendgmail is using
net/smtp
, which requires the entire OAuth2 scope. This PR reduces the required scope down to onlyhttps://www.googleapis.com/auth/gmail.send
by using the Gmail API instead.
I would love to return to using the Gmail API with a fine-grained OAuth2 scope, but that's unfortunately infeasible as per https://github.com/google/gmail-oauth2-tools/issues/32.
PS: I also replaced the deprecated
ioutil
.
Thanks. I pushed commit ce39ab7ec3b752c6ef933740a1ae36c23cb1ad6b for this.
PPS: It seems by adding the dependency
google.golang.org/api
I triggered lots of upgrades. Maybe we should just upgrade all dependencies at once?
Done. I pushed commit 6a7a700ec44b6cfc4434561e3a66c53a070b4a61 for this.
Currently, sendgmail is using
net/smtp
, which requires the entire OAuth2 scope. This PR reduces the required scope down to onlyhttps://www.googleapis.com/auth/gmail.send
by using the Gmail API instead.PS:
I also replaced the deprecateddone by ce39ab7ec3b752c6ef933740a1ae36c23cb1ad6bioutil
.It seems by adding the dependencydone by 6a7a700ec44b6cfc4434561e3a66c53a070b4a61google.golang.org/api
I triggered lots of upgrades. Maybe we should just upgrade all dependencies at once?