mail

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail struct {
	To      string
	Subject string
	Body    string
}

Mail represents a mail

type SMTPConfig

type SMTPConfig struct {
	Address  string
	Port     int
	User     string
	Helo     string
	Password []byte
}

SMTPConfig holds the configuration for the SMTP server

type Service

type Service struct {
	SubjectPrefix string
	SMTPConfig    SMTPConfig
	From          string
}

Service holds configuration for the SMTP server The sender address and an optional subject prefix

func NewMailService

func NewMailService(subjectPrefix, from string, smtpConfig SMTPConfig) Service

func (Service) Send

func (s Service) Send(m Mail) error

Send sends a mail over the configured SMTP server

func (Service) SendAsync

func (s Service) SendAsync(m Mail) error

Jump to

Keyboard shortcuts

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