Spaces:
Paused
Paused
File size: 751 Bytes
83a59ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package emails
import (
"fmt"
"strconv"
"time"
"github.com/go-hermes/hermes/v2"
)
// HermesGeneratorConfig contains details for the generator
type HermesGeneratorConfig struct {
AppURL string
AppName string
AppLogoURL string
}
// Generator creates hermes.Hermes from HermesGeneratorConfig
func (config *HermesGeneratorConfig) Generator() hermes.Hermes {
return hermes.Hermes{
Theme: newHermesTheme(),
Product: hermes.Product{
// Appears in header & footer of e-mails
Name: fmt.Sprintf("The %s Team", config.AppName),
Link: config.AppURL,
// Optional product logo
Copyright: fmt.Sprintf("© %s %s. All rights reserved.", strconv.Itoa(time.Now().Year()), config.AppName),
Logo: config.AppLogoURL,
},
}
}
|