Documentation ¶
Overview ¶
Package templates defines ready-to-use templates to send email in a nice formatting.
It is based on the Hermes package, and other services can use some specific templates Ids when sending emails to apply the formatting.
Index ¶
- func BuildTemplateWithId(user *mailer.User, templateId string, templateData map[string]string, ...) (subject string, body hermes.Body)
- func GetHermes(languages ...string) hermes.Hermes
- func PrepareSimpleBody(user *mailer.User, languages ...string) hermes.Body
- func RegisterTemplateFilter(filterFunc FilterFunc)
- type ApplicationConfigs
- type FilterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTemplateWithId ¶
func BuildTemplateWithId(user *mailer.User, templateId string, templateData map[string]string, languages ...string) (subject string, body hermes.Body)
BuildTemplateWithId prepares a hermes.Body from a templateId
func PrepareSimpleBody ¶ added in v4.3.6
PrepareSimpleBody builds a simple hermes.Body with pre-translated Name, Greeting and Signature
func RegisterTemplateFilter ¶
func RegisterTemplateFilter(filterFunc FilterFunc)
Types ¶
type ApplicationConfigs ¶
type ApplicationConfigs struct { Title string Url string LinkUrl string From string FromName string FromCtl string Logo string Copyright string TroubleText string Greeting string Signature string Theme hermes.Theme ButtonsColor string DisableCSSInlining bool }
func GetApplicationConfig ¶
func GetApplicationConfig(languages ...string) ApplicationConfigs
type FilterFunc ¶
type FilterFunc func(configs ApplicationConfigs) ApplicationConfigs
Click to show internal directories.
Click to hide internal directories.