email

package
v0.0.0-...-acda5ee Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoReply = env.Config.Email.NoReply

NoReply is the default 'from' address

Functions

func CanSendTo

func CanSendTo(address string) bool

CanSendTo returns true if Templates is allowed to send email to given address

func SetAllowlist

func SetAllowlist(s string)

SetAllowlist can be used to change email allowlist during runtime

func SetBlocklist

func SetBlocklist(s string)

SetBlocklist can be used to change email blocklist during runtime

Types

type Message

type Message struct {
	Subject string
	Body    string
}

Message represents what is sent by email

func RenderMessage

func RenderMessage(ctx context.Context, templateName string, fromAddress string, params dto.Props) *Message

RenderMessage returns the HTML of an email based on template and params

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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