mail

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const ENV_SendgridKey = "SENDGRID_API_KEY"

Variables

This section is empty.

Functions

This section is empty.

Types

type MailConf

type MailConf interface {
	NewMailServ(l log.Logger) MailServ
}

type MailServ

type MailServ interface {
	Subject(s string) MailServ
	PlaintText(p string) MailServ
	Html(h string) MailServ
	SendSingle(name, mail string) error
	SendMulti(tos []*To) error
}

type SendGridConf

type SendGridConf struct {
	ApiKey string             `yaml:"apiKey"`
	From   *sgMail.Email      `yaml:"from"`
	Bcc    *sgMail.BccSetting `yaml:"bcc"`
}

func (*SendGridConf) NewMailServ

func (conf *SendGridConf) NewMailServ(l log.Logger) MailServ

type To added in v1.0.0

type To struct {
	Name string
	Mail string
}

Jump to

Keyboard shortcuts

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