mailx

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts ...Opt)

func SendEmail

func SendEmail(m *Message)

Types

type Config

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

func (*Config) Close

func (c *Config) Close() error

type Message

type Message struct {
	From    string
	To      []string
	CC      []string
	Subject string
	//text body, html body can only set one
	TextBody string
	//text body, html body can only set one
	HtmlBody string
}

type Opt

type Opt func(*Config)

func SetAuthentication

func SetAuthentication(auth mail.AuthType) Opt

func SetConnectTimeout

func SetConnectTimeout(tm time.Duration) Opt

func SetEncryption

func SetEncryption(enc mail.Encryption) Opt

func SetHost

func SetHost(host string) Opt

func SetKeepalive

func SetKeepalive(keep bool) Opt

func SetPassword

func SetPassword(pass string) Opt

func SetPort

func SetPort(port int) Opt

func SetSendTimeout

func SetSendTimeout(tm time.Duration) Opt

func SetTlsConfig

func SetTlsConfig(config *tls.Config) Opt

func SetUsername

func SetUsername(user string) Opt

Jump to

Keyboard shortcuts

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