hermes/examples/welcome.go

41 lines
889 B
Go
Raw Normal View History

2017-03-28 16:16:20 +00:00
package main
import (
"github.com/matcornic/hermes"
)
2017-03-28 16:41:38 +00:00
type welcome struct {
2017-03-28 16:16:20 +00:00
}
2017-03-28 16:41:38 +00:00
func (w *welcome) Name() string {
2017-03-28 16:16:20 +00:00
return "welcome"
}
2017-03-28 16:41:38 +00:00
func (w *welcome) Email() hermes.Email {
2017-03-28 16:16:20 +00:00
return hermes.Email{
Body: hermes.Body{
Name: "Jon Snow",
Intros: []string{
"Welcome to Hermes! We're very excited to have you on board.",
},
Dictionary: []hermes.Entry{
{Key: "Firstname", Value: "Jon"},
{Key: "Lastname", Value: "Snow"},
{Key: "Birthday", Value: "01/01/283"},
},
Actions: []hermes.Action{
{
Instructions: "To get started with Hermes, please click here:",
Button: hermes.Button{
Text: "Confirm your account",
Link: "https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010",
2017-03-28 16:16:20 +00:00
},
},
},
Outros: []string{
"Need help, or have questions? Just reply to this email, we'd love to help.",
},
},
}
}