]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Invite newly registered users to newsletter
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 31 Oct 2019 19:00:37 +0000 (19:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 31 Oct 2019 19:00:37 +0000 (19:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/accounts.py

index 921d38cfaf349019e22eba1dd840b4ac67a59b9d..a9697e46f0ecdeea4739c4ba95add53a61bd0325 100644 (file)
@@ -245,6 +245,10 @@ class Accounts(Object):
                        first_name=res.first_name, last_name=res.last_name,
                        country_code=res.country_code)
 
+               # Invite newly registered users to newsletter
+               self.backend.messages.send_template(
+                       "newsletter/subscribe", address=account.email)
+
                # Send email about account registration
                self.backend.messages.send_template("people/messages/new-account",
                        recipients=["moderators@ipfire.org"], account=account)