mail

package
v0.0.0-...-29f5810 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Host:     "localhost",
	Port:     25,
	Insecure: true,
}

DefaultConfig is a default config for a server in a cloud.

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented used when the functionality is not implemented yet.

Functions

func Send

func Send(cfg Config, msg Message) error

Send sends a message to recipients.

func SendErrorInsecure

func SendErrorInsecure(config Config, reportErr error, r *http.Request, code int, from, subj string, to []string) error

SendErrorInsecure sends an error report to specified receivers insecurely. It means that certificates must not be trusted.

Types

type Config

type Config struct {
	Host, User, Password string
	Port                 int
	Insecure             bool
}

Config contains basic information needed for mail sending.

type Message

type Message struct {
	From, Subject, Body, BodyHTML string
	To                            []string
	Created                       time.Time
}

Message represents a message to be sent.

Jump to

Keyboard shortcuts

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