Adding beta email. Sending out a slow trickle of invites...

This commit is contained in:
Samuel Clay 2012-04-11 17:13:54 -07:00
parent 0277b64272
commit ce18a4eab7
6 changed files with 52 additions and 2 deletions

View file

@ -169,7 +169,36 @@ NewsBlur""" % {'user': self.user.username, 'feeds': subs.count()}
user.save()
logging.user(self.user, "~BB~FM~SBSending email for forgotten password: %s" % self.user.email)
def send_social_beta_email(self):
from apps.social.models import MRequestInvite
if not self.user.email:
print "Please provide an email address."
return
user = self.user
text = render_to_string('mail/email_social_beta.txt', locals())
html = render_to_string('mail/email_social_beta.xhtml', locals())
subject = "Psst, your're in..."
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()
invites = MRequestInvite.objects.filter(username=self.user.username)
if not invites:
invites = MRequestInvite.objects.filter(username=self.user.email)
if not invites:
print "User not on invite list"
else:
for invite in invites:
print "Invite listed as: %s" % invite.username
invite.email_sent = True
invite.save()
logging.user(self.user, "~BB~FM~SBSending email for social beta: %s" % self.user.email)
def autologin_url(self, next=None):
return reverse('autologin', kwargs={
'username': self.user.username,

View file

@ -24,6 +24,7 @@ from utils import json_functions as json
class MRequestInvite(mongo.Document):
username = mongo.StringField()
email_sent = mongo.BooleanField()
meta = {
'collection': 'social_invites',

View file

@ -46,7 +46,7 @@
<p style="line-height: 20px;">There's plenty of ways to use NewsBlur beyond the website:</p>
<p style="line-height: 20px;">
<ul style="list-style: none;">
<li style="line-height:22px;"><a href="http://www.newsblur.com/iphone/" style="text-decoration:none"><img src="http://www.newsblur.com/media/img/reader/iphone_icon.png" style="width:16px;height:16px;vertical-align:top;padding-top:3px;"> Download the free iPhone App</a></li>
<li style="line-height:22px;"><a href="http://www.newsblur.com/iphone/" style="text-decoration:none"><img src="http://www.newsblur.com/media/img/reader/iphone_icon.png" style="width:16px;height:16px;vertical-align:top;padding-top:3px;"> Download the free iPhone App</a>.</li>
<li style="line-height:22px;"><a href="https://market.android.com/details?id=bitwrit.Blar" style="text-decoration:none"><img src="http://www.newsblur.com/media/img/reader/android_icon.png" style="width:16px;height:16px;vertical-align:top;padding-top:3px;"> Download the Android App on the Android Market</a>.</li>
<li style="line-height:22px;"><a href="http://www.newsblur.com{{ user.profile.autologin_url }}?next=goodies" style="text-decoration:none"><img src="http://www.newsblur.com/media/img/icons/silk/package_green.png" style="width:16px;height:16px;vertical-align:top;padding-top:3px;"> Download browser extensions for Safari, Firefox, and Chrome</a>.</li>
</ul>

View file

@ -0,0 +1,11 @@
{% extends "mail/email_base.txt" %}
{% block body %}Sweet! It's beta time.
OK, you made it into the private beta for NewsBlur's new social features. There's a whole world of story sharing and interaction waiting for you.
Go here and login: http://dev.newsblur.com/?letmein={{ user.username }}
The backend for the private beta is the same. In other words, what you do on the private beta is no different than the normal website. Best not to use both at the same time.
If you notice anything oddball, incorrect, or doesn't have that new website smell, just reply to this email. I'm all ears and then some.{% endblock body %}

View file

@ -0,0 +1,9 @@
{% extends "mail/email_base.xhtml" %}
{% block body %}
<p style="font-size: 37px; color:#555555; margin-top: 18px;margin-bottom: 10px;padding-top:6px;">Sweet! It's beta time.</p>
<p style="line-height: 20px;">OK, you made it into the private beta for NewsBlur's new social features. There's a whole world of story sharing and interaction waiting for you.</p>
<p style="line-height: 20px;">Go here and login: <a href="http://dev.newsblur.com/?letmein={{ user.username }}">http://dev.newsblur.com/?letmein={{ user.username }}</a></p>
<p style="line-height: 20px;">The backend for the private beta is the same. In other words, what you do on the private beta is no different than the normal website. Best not to use both at the same time.</p>
<p style="line-height: 20px;">If you notice anything oddball, incorrect, or doesn't have that new website smell, just reply to this email. I'm all ears and then some.</p>
{% endblock %}

View file

@ -256,7 +256,7 @@
{% endif %}
</h3>
<div class="NB-module-item-title">
<div class="NB-module-item NB-module-stats NB-module-account-stats">
<div class="NB-module-item NB-module-stats NB-module-account-stats {% if not user_statistics.shared_stories %}NB-hidden{% endif %}">
<div class="NB-module-stats-count">
<div class="NB-module-stats-count-number">{{ user_statistics.shared_stories|commify }}</div>
<div class="NB-module-stats-count-description">Shared stor{{ user_statistics.shared_stories|pluralize:"y,ies" }}</div>