senders

package
v0.0.0-...-9fd0697 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmailHandler

func EmailHandler(p *pass.Pass, rw http.ResponseWriter, r *http.Request, emailcfg EmailConfig, postEmailTemplate *template.Template, emailTemplate *textTemplate.Template) bool

EmailHandler has will handle any url that fits the pattern /<UUIDv4>/email

func SendEmail

func SendEmail(emailcfg EmailConfig, rcpt string, uuid string, siteURL string, emailTemplate *textTemplate.Template) (err error)

SendEmail sends the templated email to the rcpt

Types

type EmailConfig

type EmailConfig struct {
	Sender struct {
		Address string
		Name    string
	}
	Server string
}

EmailConfig contains the config required for SendEmail

func CreateEmailcfg

func CreateEmailcfg(p *pass.Pass) EmailConfig

CreateEmailcfg Loads addon config, must be done at server startup since this will exit the server on parse error

Jump to

Keyboard shortcuts

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