From cf66deeeba38263feef0ca4123a983cb78ce5cac Mon Sep 17 00:00:00 2001 From: Horus3 Date: Thu, 12 Feb 2015 18:49:02 +0100 Subject: Removed README --- app/controllers/mail.go | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'app/controllers/mail.go') diff --git a/app/controllers/mail.go b/app/controllers/mail.go index 9ca992a..3fd2e94 100644 --- a/app/controllers/mail.go +++ b/app/controllers/mail.go @@ -1,11 +1,22 @@ package controllers -import "github.com/tanema/revel_mailer" +import ( + "github.com/tanema/revel_mailer" +) type Mailer struct { revel_mailer.Mailer } +type JobConfirmationKey struct { + Email string + Key string +} + +func (j JobConfirmationKey) Run() { + _ = Mailer{}.SendConfirmationKey(j.Email, j.Key) +} + func (u Mailer) SendConfirmationKey(email, key string) error { return u.Send(revel_mailer.H{ "subject": "Confirmation Key", @@ -14,8 +25,14 @@ func (u Mailer) SendConfirmationKey(email, key string) error { }) } -func (j jobs) AsyncConfirmRegistration(user, email, key string) { - _ = Mailer{}.ConfirmRegistration(user, email, key) +type JobRegistration struct { + User string + Email string + Key string +} + +func (j JobRegistration) Run() { + _ = Mailer{}.ConfirmRegistration(j.User, j.Email, j.Key) } func (u Mailer) ConfirmRegistration(user, email, key string) error { -- cgit v1.2.3