email

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmailNotice

func SendEmailNotice(ctx context.Context, receivers, subject, msg string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}
var (
	DefaultEmailHelper *Client
)

func NewClient

func NewClient(user, pwd, host, port string) *Client

func (*Client) SendEmail

func (e *Client) SendEmail(req *SendRequest) error

type Config

type Config struct {
	User     string `json:"user"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     string `json:"port"`
}

type SendRequest

type SendRequest struct {
	Receivers []string `json:"receivers"`
	Subject   string   `json:"subject"`
	Message   string   `json:"message"`
}

Jump to

Keyboard shortcuts

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