Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 19 lines (17 sloc) 0.778 kb
9176d55e » progrium
2011-01-23 added email kudos receiver, more design changes and added a network v…
1 from google.appengine.api import mail
2 from google.appengine.ext import deferred
3
4 FROM = 'robot@hackerdojo-kudos.appspotmail.com'
5
6 def send_kudos_email(kudos, giver, to):
7 body = ["You have been praised with %s kudos" % kudos.amount]
8 if kudos.reason:
9 body.append(" for:\n\n%s\n\n" % kudos.reason)
10 else:
11 body.append(".\n\n")
12 body.append("The Dojo community is better from your efforts.\n\n")
13 body.append("http://kudos.hackerdojo.com/kudos/%s" % kudos.key().id())
14 mail.send_mail(
15 sender="%s <%s>" % (giver.fullname(), FROM),
16 to="%s <%s>" % (to.fullname(), to.user.email()),
17 reply_to="%s <%s>" % (giver.fullname(), giver.user.email()),
18 subject="[Kudos] Thank you from the community",
19 body=''.join(body))
Something went wrong with that request. Please try again.