gmail

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MailPermissionReadonly = gmail.GmailReadonlyScope
	MailGmailSendScope     = gmail.GmailSendScope
)
View Source
const (
	MailCredentials = `` /* 406-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func GetTokenFromWeb

func GetTokenFromWeb(config *oauth2.Config) (*oauth2.Token, error)

func InitConfig

func InitConfig(permission string, credentials []byte) (*spcfg.Config, error)

func ReadGmailCredentialsOrDefault

func ReadGmailCredentialsOrDefault(path string) ([]byte, error)

Types

type Gmail

type Gmail struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(token *config.GmailToken, credentialsPath string) (*Gmail, error)

func (*Gmail) List

func (m *Gmail) List(name, query string) ([]structs.Message, error)

func (*Gmail) Send

func (m *Gmail) Send(msg []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL