email

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	Dialer *gomail.Dialer
	Config *EmailConfig
}

func New

func New(cfg *EmailConfig) (*Email, error)

func (*Email) Send

func (e *Email) Send(to []string, subject, body string, opts ...Option) error

type EmailConfig

type EmailConfig struct {
	Smtp     string
	Port     int
	Email    string
	Password string
	FromName string
}

type Option

type Option func(*emailOptions)

func WithAttachments

func WithAttachments(files []string) Option

func WithBCC

func WithBCC(bcc []string) Option

func WithCC

func WithCC(cc []string) Option

func WithHTML

func WithHTML() Option

Jump to

Keyboard shortcuts

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