Email

package
v0.0.0-...-a4de9da Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGmail

func InitGmail(credentials string, tokFile string) (err error)

func InitSMTP

func InitSMTP(Host, User, Pwd, Reply string)

Types

type GMail

type GMail struct {
	SendUser    string
	SendAddress string
	// contains filtered or unexported fields
}
var Gmail *GMail

func NewGmail

func NewGmail() *GMail

func (*GMail) SendEmail

func (G *GMail) SendEmail(sendmsg GmailMsg) (*gmail.Message, error)

type GmailMsg

type GmailMsg interface {
	GetTo() string
	GetSubject() string
	GetBody() string
}

type SMTPSendData

type SMTPSendData interface {
	GetTo() string
	GetSubject() string
	GetBody() string
	GetMailType() string
}

type Smtp

type Smtp struct {
	Host      string
	SendUser  string
	SendPwd   string
	ReplyUser string
	UserName  string
}
var SMTP *Smtp

func NewSMTP

func NewSMTP() *Smtp

func (*Smtp) Send

func (E *Smtp) Send(Data SMTPSendData) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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