// SendAccountActivation sends an email regarding account
// activation with the token, embedded into a full URL, to the
// specified email address.
SendAccountActivation sends an email regarding account
activation with the token, embedded into a full URL, to the
specified email address.
// SendAccountActivation sends an email regarding account // activation with the token embedded into a full URL to the // specified email address .
func (m *Manager) SendAccountActivation(ctx context.Context, eml, tok string) {
	e := hermes.Email{
		Body: hermes.Body{
			Title: "Welcome!",
			Intros: []string{
				"We're very excited to have you on board.",
			},
			Actions: []hermes.Action{
				{
					Instructions: "To activatate your account, please click here:",
					Button: hermes.Button{
						Text: "Activate",
						Link: m.links.Prep(
							httpflow.LinkActivation, tok),
					},
				},
				{
					Instructions: "Wrong email address? Please click here:",
					Button: hermes.Button{
						Text: "Cancel",
						Link: m.links.Prep(
							httpflow.LinkActivationCancel, tok),
					},
				},
			},
		},
	}
	eBody, err := m.herm.GenerateHTML(e)
	if err != nil {
		logutil.Critical(m.log, err).Msg("cannot generate account activation email")
		return
	}
	subj := fmt.Sprintf("Welcome to %s", m.herm.Product.Name)
	m.send(ctx, eml, subj, eBody)
}
func ( m * Manager ) SendAccountActivation ( ctx context . Context , eml , tok string ) { e := hermes . Email { Body : hermes . Body { Title : " " , Intros : [ ] string { " " , } , Actions : [ ] hermes . Action { { Instructions : " " , Button : hermes . Button { Text : " " , Link : m . links . Prep ( httpflow . LinkActivation , tok ) , } , } , { Instructions : " " , Button : hermes . Button { Text : " " , Link : m . links . Prep ( httpflow . LinkActivationCancel , tok ) , } , } , } , } , } eBody , err := m . herm . GenerateHTML ( e ) if err != nil { logutil . Critical ( m . log , err ) . Msg ( " " ) return } subj := fmt . Sprintf ( " " , m . herm . Product . Name ) m . send ( ctx , eml , subj , eBody ) }
SendAccountActivation sends an email regarding account
activation with the token, embedded into a full URL, to the
specified email address.
SendAccountActivation sends an email regarding account activation with the token embedded into a full URL to the specified email address .