summaryrefslogtreecommitdiff
path: root/app/controllers/mail.go
blob: b05da4e35ec0e1a9f3577c6afd2c0acfe5bc89ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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,
	})
}