mail

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Use

func Use(config *Config)

Use method

Types

type Address added in v0.0.17

type Address struct {
	Reference string
	Name      string
	Email     string
}

Address struct

func Get added in v0.0.17

func Get(reference string) Address

Get address by reference

type Config

type Config struct {
	SMTP      SMTP
	Addresses []Address
	Data      Data
}

Config struct

type Data

type Data = map[string]any

Data type

type Mail

type Mail struct {
	From    Address
	To      string
	ReplyTo string
	Subject string
	Message string
	Data    Data
}

Mail struct

func (*Mail) Delivery

func (m *Mail) Delivery() error

Delivery method

func (*Mail) Fill

func (m *Mail) Fill()

Fill method

type SMTP

type SMTP struct {
	Host     string
	Port     string
	Username string
	Password string
}

SMTP struct

func (*SMTP) Address

func (s *SMTP) Address() string

Address method

func (*SMTP) Auth

func (s *SMTP) Auth() smtp.Auth

Auth method

func (*SMTP) Delivery

func (s *SMTP) Delivery(mail *Mail, content []byte) error

Delivery method

Jump to

Keyboard shortcuts

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