httpsms-gateway / api /pkg /emails /hermes_mailer.go
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca
Raw History Blame Contribute Delete
751 Bytes
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,
},
}
}