google mail API [[FIN]]
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m28s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m28s
This commit is contained in:
@@ -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{},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user