email

package
v0.0.0-...-0ad4d90 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Templates = map[string]string{
	"visiting_rejected": "visiting_rejected",
	"visiting_added":    "visiting_added",
	"visiting_removed":  "visiting_removed",
	"inactive_warning":  "inactive_warning",
	"inactive":          "inactive",
}

Functions

func BuildBody

func BuildBody(name string, data map[string]interface{}) (*bytes.Buffer, string, string, string, error)

func Send

func Send(to, from, subject string, template string, data map[string]interface{}) error

Types

type Template

type Template struct {
	Subject string   `json:"subject"`
	CC      []string `json:"cc"`
	BCC     []string `json:"bcc"`
	Body    string   `json:"body"`
}

func GetTemplate

func GetTemplate(name string) (*Template, error)

Jump to

Keyboard shortcuts

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