mail

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 4 Imported by: 0

README

mail

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 MailLog) MailServ
}

type MailLog

type MailLog interface {
	Info(string)
	Debug(string)
}

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 MailLog) MailServ

type To

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