diff --git a/frontend/templates/emails/read_this.txt b/frontend/templates/emails/read_this.txt new file mode 100644 index 00000000..eae67f6d --- /dev/null +++ b/frontend/templates/emails/read_this.txt @@ -0,0 +1,3 @@ +Thanks to Unglue.it, I'm reading a free, DRM-free ebook of {{ work.title }}. I think you'd enjoy reading it too. You can download it at https://{{site}}{% url download work.id %} You can also copy it, put it on your favorite ereader, and shift it to different formats, freely and legally. + +Unglue.it helps book lovers pay creators to make their ebooks free to everyone on earth. You can help too at https://unglue.it/ . \ No newline at end of file diff --git a/frontend/views.py b/frontend/views.py index c0593842..9ba47e0b 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -2011,11 +2011,15 @@ def emailshare(request, action): status = None # customize the call to action depending on campaign status - if status == 'ACTIVE': + if status == 'SUCCESSFUL' or work.first_ebook(): + message = render_to_string('emails/read_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()}) + subject = 'I think you\'d like this book I\'m reading' + elif status == 'ACTIVE': message = render_to_string('emails/pledge_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()}) + subject = 'Please help me give this book to the world' else: message = render_to_string('emails/wish_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()}) - subject = 'Come see one of my favorite books on Unglue.it' + subject = 'Come see one of my favorite books on Unglue.it' form = EmailShareForm(initial={ 'next':next, 'subject': subject, 'message': message}) except: