gmail

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(user, password, server string)

thread safe initialization. it only writes content to variable packageInitInstance once and since this variable cannot be accesses by other code outside this file, it is completely thread safe

func SendWithGmail

func SendWithGmail(data *model.Maildata) (json.RawMessage, error)

Types

type ApiGmailer

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

func NewApiGmailer

func NewApiGmailer() *ApiGmailer

type MailServerConfig

type MailServerConfig struct {
	Username    string
	Password    string
	EmailServer string
	Auth        smtp.Auth
}

func GetGmailServerConfigInstance

func GetGmailServerConfigInstance(user, password, server string) *MailServerConfig

@deprecated use GetGmailServerConfigInstanceInit() instead

warning: this is a non-thread safe implementation of singleton. use at your own risk knowning variable ioproto access

func GetGmailServerConfigInstanceInit

func GetGmailServerConfigInstanceInit() *MailServerConfig

func GetGmailServerConfigInstanceThreadSafe

func GetGmailServerConfigInstanceThreadSafe(user, password, server string) *MailServerConfig

@deprecated use GetGmailServerConfigInstanceInit() instead

func (*MailServerConfig) SendInsecure

func (c *MailServerConfig) SendInsecure(fromMail, toMail *mail.Address, subject, msg string) error

func (*MailServerConfig) SendWithSSL

func (c *MailServerConfig) SendWithSSL(fromMail, toMail *mail.Address, subject, body string) error

Jump to

Keyboard shortcuts

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