mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding template for Turn Touch end campaign email.
This commit is contained in:
parent
ea3dcfeefa
commit
5d6ad89bf6
3 changed files with 72 additions and 0 deletions
|
@ -813,6 +813,36 @@ NewsBlur""" % {'user': self.user.username, 'feeds': subs.count()}
|
|||
msg.send(fail_silently=True)
|
||||
|
||||
logging.user(self.user, "~BB~FM~SBSending launch TT email for user: %s months, %s" % (months_ago, self.user.email))
|
||||
|
||||
def send_launch_turntouch_end_email(self, force=False):
|
||||
if not self.user.email or not self.send_emails:
|
||||
logging.user(self.user, "~FM~SB~FRNot~FM sending launch TT end email for user, %s: %s" % (self.user.email and 'opt-out: ' or 'blank', self.user.email))
|
||||
return
|
||||
|
||||
params = dict(receiver_user_id=self.user.pk, email_type='launch_turntouch_end')
|
||||
try:
|
||||
sent_email = MSentEmail.objects.get(**params)
|
||||
if not force:
|
||||
# Return if email already sent
|
||||
logging.user(self.user, "~FM~SB~FRNot~FM sending launch TT end email for user, sent already: %s" % self.user.email)
|
||||
return
|
||||
except MSentEmail.DoesNotExist:
|
||||
sent_email = MSentEmail.objects.create(**params)
|
||||
|
||||
delta = datetime.datetime.now() - self.last_seen_on
|
||||
months_ago = delta.days / 30
|
||||
user = self.user
|
||||
data = dict(user=user, months_ago=months_ago)
|
||||
text = render_to_string('mail/email_launch_turntouch_end.txt', data)
|
||||
html = render_to_string('mail/email_launch_turntouch_end.xhtml', data)
|
||||
subject = "Last day to back Turn Touch: NewsBlur's beautiful remote"
|
||||
msg = EmailMultiAlternatives(subject, text,
|
||||
from_email='NewsBlur <%s>' % settings.HELLO_EMAIL,
|
||||
to=['%s <%s>' % (user, user.email)])
|
||||
msg.attach_alternative(html, "text/html")
|
||||
msg.send(fail_silently=True)
|
||||
|
||||
logging.user(self.user, "~BB~FM~SBSending launch TT end email for user: %s months, %s" % (months_ago, self.user.email))
|
||||
|
||||
def grace_period_email_sent(self, force=False):
|
||||
emails_sent = MSentEmail.objects.filter(receiver_user_id=self.user.pk,
|
||||
|
|
17
templates/mail/email_launch_turntouch_end.txt
Normal file
17
templates/mail/email_launch_turntouch_end.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "mail/email_base.txt" %}
|
||||
|
||||
{% load utils_tags %}
|
||||
|
||||
{% block body %}This is it, the final countdown!
|
||||
|
||||
Tonight at 8pm PT the Turn Touch campaign will end and the project will be successfully funded. Judging from the $50,000 raised already, I think Turn Touch has a long life ahead of it.
|
||||
|
||||
Watch the 2 minute demo on Vimeo: https://vimeo.com/207556527
|
||||
|
||||
Apart from being the only remote control in the world built for a news reader, Turn Touch is the handiest shortcut for your lights, music, and apps. It's basically a customizable remote with a knack for smart homes.
|
||||
|
||||
Supporting Turn Touch is a way of supporting NewsBlur. They are part of the same suite of productivity tools made by the same person (@samuelclay: https://twitter.com/samuelclay). By buying a Turn Touch and backing this Kickstarter, you're continuing to fund the development of great tools.
|
||||
|
||||
So please head to Kickstarter and buy yourself the $59 mahogany remote, even if you do not yet have any smart home devices. This remote is the easiest way to start connecting your home.
|
||||
|
||||
https://turntouch.com/kickstarter{% endblock body %}
|
25
templates/mail/email_launch_turntouch_end.xhtml
Normal file
25
templates/mail/email_launch_turntouch_end.xhtml
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends "mail/email_base.xhtml" %}
|
||||
{% load utils_tags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 style="margin: 24px 0;">This is it, the final countdown!</h3>
|
||||
|
||||
<p>Tonight at 8pm PT the <a href="https://www.kickstarter.com/projects/samuelclay/turn-touch-beautiful-control/">Turn Touch campaign</a> will end and the project will be successfully funded. Judging from the $50,000 raised already, I think Turn Touch has a long life ahead of it.</p>
|
||||
|
||||
<p><a href="https://www.kickstarter.com/projects/samuelclay/turn-touch-beautiful-control/"><img src="http://static.newsblur.com.s3.amazonaws.com/turntouch/animated-newsblur-live.gif" width="650"></a></p>
|
||||
|
||||
<div style="font-size: 12px;margin: 0 0 24px;"><a href="https://vimeo.com/207556527">🖥 Watch the 2 minute demo on Vimeo</a></div>
|
||||
|
||||
<p>Apart from being the only remote control in the world built for a news reader, Turn Touch is the handiest shortcut for your lights, music, and apps. It's basically a customizable remote with a knack for smart homes.</p>
|
||||
|
||||
<p>Supporting Turn Touch is a way of supporting NewsBlur. They are part of the same suite of productivity tools made by the <a href="https://twitter.com/samuelclay">same person</a>. By buying a Turn Touch and backing this Kickstarter, you're continuing to fund the development of great tools.</p>
|
||||
|
||||
<p>So please <a href="https://www.kickstarter.com/projects/samuelclay/turn-touch-beautiful-control/">head to Kickstarter and buy yourself the $59 mahogany remote</a>, even if you do not yet have any smart home devices. This remote is the easiest way to start connecting your home.</p>
|
||||
|
||||
<p><a href="https://www.kickstarter.com/projects/samuelclay/turn-touch-beautiful-control/"><img src="http://static.newsblur.com.s3.amazonaws.com/turntouch/padauk-book.jpg" width="650"></a></p>
|
||||
|
||||
<p><img src="https://turntouch.com/static/images/kickstarter/signature-samuel-clay.png" style="width: 207px;"></p>
|
||||
|
||||
<p>— <a href="https://twitter.com/samuelclay">@samuelclay</a></p>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue