diff options
Diffstat (limited to 'app/controllers/mail.go')
| -rw-r--r-- | app/controllers/mail.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/controllers/mail.go b/app/controllers/mail.go new file mode 100644 index 0000000..b05da4e --- /dev/null +++ b/app/controllers/mail.go @@ -0,0 +1,24 @@ +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 (u Mailer) ConfirmRegistration(user, email, key string) error { + return u.Send(revel_mailer.H{ + "name": user, + "subject": "Confirm registration", + "to": []string{email}, + "key": key, + }) +} |
