package controllers import "github.com/tanema/revel_mailer" type Mailer struct { revel_mailer.Mailer } func (u Mailer) SendConfirmationKey(email, key string) error { return u.Send(revel_mailer.H{ "subject": "Confirmation Key", "to": []string{email}, "key": key, }) } func (j jobs) AsyncConfirmRegistration(user, email, key string) { _ = Mailer{}.ConfirmRegistration(user, email, key) } func (u Mailer) ConfirmRegistration(user, email, key string) error { return u.Send(revel_mailer.H{ "name": user, "subject": "Confirm registration", "to": []string{email}, "key": key, }) }