mail

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	contract.MessageInterface

	To          []mail.Address
	CC          []mail.Address
	BCC         []mail.Address
	Subject     string
	Body        string
	Attachments map[string][]byte
}

func NewMessage

func NewMessage(s, b string) *Message

func (*Message) AttachData

func (m *Message) AttachData(fileName string, data []byte) error

func (*Message) AttachFile

func (m *Message) AttachFile(src string) error

func (*Message) BodyToBytes

func (m *Message) BodyToBytes() []byte

type SMTPConfig

type SMTPConfig struct {
	Host       string
	UserName   mail.Address
	Password   string
	PortNumber string
	ServerName string
	TLSConfig  *tls.Config
}

type Sender

type Sender struct {
	SMTPConfig *SMTPConfig
	// contains filtered or unexported fields
}

func NewSender

func NewSender(config *SMTPConfig) *Sender

func (*Sender) Send

func (s *Sender) Send(m *Message) error

Jump to

Keyboard shortcuts

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