google mail API [[FIN]]
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m28s

This commit is contained in:
2023-12-04 13:48:11 +01:00
parent 8f13eb2f16
commit 358c238f3d
9 changed files with 549 additions and 131 deletions

View File

@@ -1,14 +1,22 @@
package googleapi
import (
"context"
"net/http"
)
type GoogleClient interface {
SendMail(ctx context.Context, from string, recipients []string, cc []string, bcc []string, subject string, body MailBody, attachments []MailAttachment) (MailRef, error)
}
type client struct {
oauth GoogleOAuth
http http.Client
}
func NewGoogleClient(oauth GoogleOAuth) GoogleClient {
return &client{
oauth: oauth,
http: http.Client{},
}
}