gmailer

package module
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Gmailer allows for OAUTH authentication to GMail and sending of basic email messages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	AccessToken  string
	RefreshToken string
	EmailTo      string
	EmailFrom    string
	ReplyTo      string
	Subject      string
	Body         string
	Service      *gmail.Service
}

Config is type containing OAuth credentials and email message information

func (*Config) Authenticate

func (config *Config) Authenticate() (err error)

Authenticate authenticates with GMail OAuth, and returns a pointer to gmail.Service when successfully authenticated

func (*Config) Send

func (config *Config) Send() (err error)

Send takes a pointer to gmail.Service and is called on a Config type to send an email

Jump to

Keyboard shortcuts

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