Spaces:
Paused
Paused
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 Download api/pkg/emails/hermes_mailer.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/emails/hermes_mailer.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/api/pkg/emails/hermes_mailer.go
-
curl -L -o hermes_mailer.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/emails/hermes_mailer.go
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, | |
| }, | |
| } | |
| } | |