smtp

package
v0.0.0-...-f44e3a7 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `json:"host" validate:"required"`
	Port     int    `json:"port" validate:"required"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type SMTP

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

func NewSmtpClient

func NewSmtpClient(cfg *Config) (smtp *SMTP, err error)

func (*SMTP) Send

func (m *SMTP) Send(ctx context.Context, subject, from, to string, body []byte) (err error)

Jump to

Keyboard shortcuts

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