Verified Commit 461a8117 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Improve emails, fix dry-run and change website from mail

parent ea5b1e35
......@@ -15,18 +15,19 @@ def send_membership_announcement(dry_run=False):
for member in members:
print("Send email to {} ({})".format(member.get_full_name(),
member.user.email))
with translation.override(member.language):
email_body = loader.render_to_string(
'members/email/membership_announcement.txt',
{'name': member.get_full_name()})
mail.EmailMessage(
_('Membership announcement'),
email_body,
settings.WEBSITE_FROM_ADDRESS,
[member.user.email],
bcc=[settings.BOARD_NOTIFICATION_ADDRESS],
connection=connection
).send()
if not dry_run:
with translation.override(member.language):
email_body = loader.render_to_string(
'members/email/membership_announcement.txt',
{'name': member.get_full_name()})
mail.EmailMessage(
_('Membership announcement'),
email_body,
settings.WEBSITE_FROM_ADDRESS,
[member.user.email],
bcc=[settings.BOARD_NOTIFICATION_ADDRESS],
connection=connection
).send()
if not dry_run:
mail.mail_managers(
......
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-09 22:32+0200\n"
"PO-Revision-Date: 2017-06-09 22:33+0200\n"
"POT-Creation-Date: 2017-06-14 21:21+0200\n"
"PO-Revision-Date: 2017-06-14 21:22+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.1\n"
"X-Generator: Poedit 2.0.2\n"
#: admin.py:36
msgid "membership type"
......@@ -74,11 +74,11 @@ msgstr "Studentnummer"
msgid "Download student number label for selected users"
msgstr "Download studentnummers voor geselecteerde gebruikers"
#: emails.py:23
#: emails.py:24
msgid "Membership announcement"
msgstr "Mededeling over lidmaatschap"
#: emails.py:33
#: emails.py:34
msgid "Membership announcement sent"
msgstr "Mededeling over lidmaatschap verzonden"
......@@ -452,7 +452,11 @@ msgid ""
"\n"
"With kind regards,\n"
"\n"
"The board of Study Association Thalia"
"The board of Study Association Thalia\n"
"\n"
"————\n"
"\n"
"This email was automatically generated."
msgstr ""
"Dear %(name)s,\n"
"\n"
......@@ -468,7 +472,11 @@ msgstr ""
"\n"
"Met vriendelijke groeten,\n"
"\n"
"Het bestuur"
"Het bestuur der Studievereniging Thalia\n"
"\n"
"————\n"
"\n"
"Deze e-mail is automatisch gegenereerd."
#: templates/members/email/welcome.txt:1
#, python-format
......
......@@ -11,4 +11,8 @@ If you have any questions, then don't hesitate and send us an email.
With kind regards,
The board of Study Association Thalia{% endblocktrans %}
The board of Study Association Thalia
————
This email was automatically generated.{% endblocktrans %}
Geacht bestuur,
Dear board,
Vanwege de tijd van het jaar heeft de website automatisch iedereen met een studielidmaatschap een email gestuurd.
It's that time of the year again! The website sent an automatic email to
all members that have a study membership.
In die email staat dat het lidmaatschap geldig is zolang ze een studie informatica en/of informatiekunde volgen.
We hebben deze mensen gevraagd om, indien ze afgestudeerd zijn of om een andere reden gestopt met hun studie,
een mailtje te sturen naar info@thalia.nu. Hierbij willen we graag laten weten dat jullie deze emails kunnen verwachten.
That email tells them that their membership is valid as long as they're enrolled
in either a computer science or an information science programme.
We asked them to notify you when they graduate or stop with their studies for any
other reason so that you'll be able to update the administration.
De email is gestuurd naar:
This means that you can expect an influx of emails from members.
The email was sent to:
{% for member in members %}
* {{ member.full_name }}
{% endfor %}
Kusjes,
Kisses,
De website
The website
......@@ -234,7 +234,7 @@ SERVER_EMAIL = DEFAULT_FROM_EMAIL
NEWSLETTER_FROM_ADDRESS = 'nieuwsbrief@thalia.nu'
# Website FROM address
WEBSITE_FROM_ADDRESS = 'no-reply@thalia.nu'
WEBSITE_FROM_ADDRESS = 'info@thalia.nu'
# Board notification address
BOARD_NOTIFICATION_ADDRESS = 'info@thalia.nu'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment