~chipaca/unity-lens-video/custom-user-agent

« back to all changes in this revision

Viewing changes to main/email.py

  • Committer: Janos Gyerik
  • Date: 2012-02-17 21:49:05 UTC
  • Revision ID: janos@axiom-20120217214905-eobl7s4tyleglc0n
completed email notifications

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
    return send_email(subject, message, *recipients)
27
27
 
 
28
def send_oneliner_answer(question, oneliner):
 
29
    if question.user.email:
 
30
        send_email_template(
 
31
                'email/answer-sub.txt', { 'question': question, }, 
 
32
                'email/answer-msg.txt', {
 
33
                    'question': question,
 
34
                    'oneliner': oneliner,
 
35
                    },
 
36
                question.user.email
 
37
                )
 
38
 
 
39
def send_oneliner_alternative(oneliner, new_oneliner):
 
40
    if oneliner.user.email:
 
41
        send_email_template(
 
42
                'email/alternative-sub.txt', { 'oneliner': oneliner, }, 
 
43
                'email/alternative-msg.txt', {
 
44
                    'oneliner': oneliner,
 
45
                    'new_oneliner': new_oneliner,
 
46
                    },
 
47
                oneliner.user.email
 
48
                )
 
49
 
 
50
def send_oneliner_comment(oneliner, sender, comment):
 
51
    if oneliner.user.email:
 
52
        send_email_template(
 
53
                'email/comment-sub.txt', { 'oneliner': oneliner, }, 
 
54
                'email/comment-msg.txt', {
 
55
                    'oneliner': oneliner,
 
56
                    'sender': sender,
 
57
                    'comment': comment,
 
58
                    },
 
59
                oneliner.user.email
 
60
                )
 
61
 
28
62
 
29
63
# eof