mailer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSubject = "Public key validation"
View Source
var DefaultTemplate = `` /* 818-byte string literal not displayed */

Functions

func CheckConfig

func CheckConfig(cfg *Config) error

func NewMessage

func NewMessage(from, to, subject, text string) *gomail.Message

func Send

func Send(cfg *Config, m ...*gomail.Message) error

Types

type Config

type Config struct {
	SMTPServer      string `yaml:"smtp-server"`
	SMTPPort        int    `yaml:"smtp-port"`
	SMTPInsecureTLS bool   `yaml:"smtp-insecure-tls"`
	SMTPUsername    string `yaml:"smtp-username"`
	SMTPPassword    string `yaml:"smtp-password"`
	Subject         string `yaml:"subject"`
	MessageTemplate string `yaml:"message"`
}
var DefaultConfig Config = Config{
	SMTPServer:      "localhost",
	SMTPPort:        25,
	Subject:         DefaultSubject,
	MessageTemplate: DefaultTemplate,
}

type TemplateArgs

type TemplateArgs struct {
	Name          string
	PublicURL     string
	PublicAuthURL string
	Fingerprint   string
}

Jump to

Keyboard shortcuts

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