mail

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 5 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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