mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding graphic to archive thank you email.
This commit is contained in:
parent
6b0250ab55
commit
1116569160
4 changed files with 40 additions and 8 deletions
|
@ -1261,18 +1261,21 @@ class Profile(models.Model):
|
|||
return
|
||||
except MSentEmail.DoesNotExist:
|
||||
MSentEmail.objects.create(**params)
|
||||
|
||||
feed_count = UserSubscription.objects.filter(user=self.user).count()
|
||||
user = self.user
|
||||
text = render_to_string('mail/email_new_premium_archive.txt', locals())
|
||||
html = render_to_string('mail/email_new_premium_archive.xhtml', locals())
|
||||
subject = f"Your NewsBlur Premium Archive backfill is complete: from {pre_archive_count:,} to {total_story_count:,} stories"
|
||||
if total_story_count > pre_archive_count:
|
||||
subject = f"NewsBlur archive backfill is complete: from {pre_archive_count:,} to {total_story_count:,} stories"
|
||||
else:
|
||||
subject = f"NewsBlur archive backfill is complete: {total_story_count:,} stories"
|
||||
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()
|
||||
|
||||
logging.user(self.user, "~BB~FM~SBSending email for new premium archive: %s" % self.user.email)
|
||||
logging.user(self.user, "~BB~FM~SBSending email for new premium archive: %s (%s to %s stories)" % (self.user.email, pre_archive_count, total_story_count))
|
||||
|
||||
def send_new_premium_pro_email(self, force=False):
|
||||
if not self.user.email or not self.send_emails:
|
||||
|
|
|
@ -658,7 +658,7 @@ class UserSubscription(models.Model):
|
|||
(total, round(duration, 2)))
|
||||
r.publish(user.username, 'fetch_archive:done')
|
||||
|
||||
return ending_story_count, pre_archive_count
|
||||
return ending_story_count, min(pre_archive_count, starting_story_count)
|
||||
|
||||
|
||||
@classmethod
|
||||
|
|
24
media/img/email/datacenter.svg
Normal file
24
media/img/email/datacenter.svg
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#676767">
|
||||
<path d="m131.25 281.25h450c20.68 0 37.5-16.82 37.5-37.5v-112.5c0-20.68-16.82-37.5-37.5-37.5h-450c-20.68 0-37.5 16.82-37.5 37.5v112.5c0 20.68 16.82 37.5 37.5 37.5zm0-150h450l0.019531 112.5h-450.02z"/>
|
||||
<path d="m168.75 168.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m318.75 168.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m243.75 168.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m318.75 768.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m168.75 768.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m243.75 768.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m131.25 581.25h450c20.68 0 37.5-16.82 37.5-37.5v-112.5c0-20.68-16.82-37.5-37.5-37.5h-450c-20.68 0-37.5 16.82-37.5 37.5v112.5c0 20.68 16.82 37.5 37.5 37.5zm0-150h450v112.5h-450z"/>
|
||||
<path d="m356.25 468.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m506.25 468.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m431.25 468.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m93.75 993.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m93.75 1068.8h37.5v37.5h-37.5z"/>
|
||||
<path d="m168.75 993.75h37.5v37.5h-37.5z"/>
|
||||
<path d="m168.75 1068.8h37.5v37.5h-37.5z"/>
|
||||
<path d="m506.25 993.75h37.5v112.5h-37.5z"/>
|
||||
<path d="m431.25 993.75h37.5v112.5h-37.5z"/>
|
||||
<path d="m881.25 581.25c-70.93 0-136.09 24.883-187.5 66.188v-141.19h195.26l37.5-37.5h108.19c7.7617 21.77 28.387 37.5 52.801 37.5 31.012 0 56.25-25.238 56.25-56.25s-25.238-56.25-56.25-56.25c-24.414 0-45.039 15.73-52.801 37.5h-123.71l-37.5 37.5h-179.74v-112.5h195.26l37.5-37.5h108.19c7.7617 21.77 28.387 37.5 52.801 37.5 31.012 0 56.25-25.238 56.25-56.25s-25.238-56.25-56.25-56.25c-24.414 0-45.039 15.73-52.801 37.5h-123.71l-37.5 37.5h-179.74v-112.5h195.26l37.5-37.5h108.19c7.7617 21.77 28.387 37.5 52.801 37.5 31.012 0 56.25-25.238 56.25-56.25s-25.238-56.25-56.25-56.25c-24.414 0-45.039 15.73-52.801 37.5h-123.71l-37.5 37.5h-179.74v-56.25c0-51.695-42.055-93.75-93.75-93.75h-487.5c-51.695 0-93.75 42.055-93.75 93.75v975c0 51.695 42.055 93.75 93.75 93.75h487.5c43.086 0 79.105-29.383 90.039-69.055 51.938 43.105 118.59 69.055 191.21 69.055 165.41 0 300-134.59 300-300s-134.59-300-300-300zm206.25-150c10.352 0 18.75 8.418 18.75 18.75s-8.3984 18.75-18.75 18.75-18.75-8.418-18.75-18.75 8.3984-18.75 18.75-18.75zm0-150c10.352 0 18.75 8.418 18.75 18.75s-8.3984 18.75-18.75 18.75-18.75-8.418-18.75-18.75 8.3984-18.75 18.75-18.75zm0-150c10.352 0 18.75 8.418 18.75 18.75s-8.3984 18.75-18.75 18.75-18.75-8.418-18.75-18.75 8.3984-18.75 18.75-18.75zm-187.5 488.46c58.273 4.1445 111.26 27.281 152.89 63.395l-152.89 152.89zm-318.75 74.043h-450c-20.68 0-37.5 16.82-37.5 37.5v112.5c0 20.68 16.82 37.5 37.5 37.5h450c0 12.73 1.0508 25.18 2.6055 37.5h-527.61v-262.5h600v27.242c-14.27 16.219-26.961 33.824-37.5 52.855v-5.0977c0-20.68-16.82-37.5-37.5-37.5zm0.019531 150h-450.02v-112.5h450zm74.98-225h-600v-262.5h600zm-543.75-562.5h487.5c31.012 0 56.25 25.238 56.25 56.25v206.25h-600v-206.25c0-31.012 25.238-56.25 56.25-56.25zm487.5 1087.5h-487.5c-31.012 0-56.25-25.238-56.25-56.25v-131.25h534.88c3.3203 12.824 7.293 25.387 12.207 37.5h-22.09v112.5h37.5v-80.082c10.539 19.031 23.23 36.637 37.5 52.855v8.4766c0 31.012-25.238 56.25-56.25 56.25zm18.75-262.5c0-138.41 107.76-251.87 243.75-261.54v523.11c-135.99-9.6953-243.75-123.15-243.75-261.56zm281.25 261.54v-253.78l179.4-179.4c39.977 46.066 64.352 105.99 64.352 171.64 0 138.41-107.76 251.87-243.75 261.54z"/>
|
||||
<path d="m819.9 664.73c-96.355 27.242-163.65 116.29-163.65 216.52h37.5c0-83.551 56.062-157.74 136.35-180.45z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -1,10 +1,15 @@
|
|||
{% extends "mail/email_base.xhtml" %}
|
||||
|
||||
{% block body %}
|
||||
<h2 style="color: #282F33; font-size: 18px; font-weight: bold;">Now everything you read on the web is archived</h2>
|
||||
{% load utils_tags %}
|
||||
|
||||
<p style="line-height: 20px;">A <b>huge</b> thanks for subscribing to the premium archive tier.</p>
|
||||
<p style="line-height: 20px;">Your subscription helps pay for the machines which store and process your archive.</p>
|
||||
{% block body %}
|
||||
<h2 style="color: #282F33; font-size: 18px; font-weight: bold;">Now everything you read on the web is archived, searchable, shareable, and not going anywhere</h2>
|
||||
|
||||
<img src="https://{% current_domain %}/media/img/email/datacenter.svg" style="width:180px;height:180px;margin: 24px auto;" alt="Your archive sits in the cloud">
|
||||
|
||||
<h2 syle="font-size: 34px;text-align: center;display: block; margin: 0 auto 24px;">{{ total_story_count|commify }} stories across {{ feed_count|commify }} sites</h2>
|
||||
|
||||
<p style="line-height: 20px;">A <b>huge</b> thank you for subscribing to the premium archive tier. Your subscription helps pay for the machines which store and process your archive.</p>
|
||||
<p style="line-height: 20px;">NewsBlur is an archive for the web you follow. Search it, clip highlights and share notes, and rest assured that your data will remain even as the web it pulls from may not. Thanks again for supporting NewsBlur.</p>
|
||||
<p style="line-height: 20px;">- Sam Clay</p>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Reference in a new issue