mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
Add unsub link to newsletters (#1455)
* Add unsub link to newsletters * Remove debug statement * Updated unsub link * Update unsub style * Format Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
This commit is contained in:
parent
363a9932f1
commit
53ef99562c
2 changed files with 14 additions and 0 deletions
|
@ -30,7 +30,9 @@ def send_newsletter_to_user(newsletter, user) -> (bool, str):
|
|||
html_template.render(
|
||||
user=user,
|
||||
URL=URL,
|
||||
unsubscribe_link=unsubscribe_link,
|
||||
),
|
||||
unsubscribe_link=unsubscribe_link,
|
||||
)
|
||||
|
||||
NewsletterUser.create(newsletter_id=newsletter.id, user_id=user.id, commit=True)
|
||||
|
|
12
templates/emails/com/newsletter.html
Normal file
12
templates/emails/com/newsletter.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
<p class="f-fallback sub align-center"
|
||||
style="font-size: 13px;
|
||||
line-height: 1.625;
|
||||
text-align: center;
|
||||
margin: .4em 0 1.1875em;">
|
||||
<a href="{{ unsubscribe_link }}">Unsubscribe from our newsletter</a>
|
||||
</p>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue