diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-15 07:12:06 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-15 07:12:06 +0200 |
commit | a14da171a0cd3f5023e97b6b36e6f8edee91376e (patch) | |
tree | 7f78690d2a7f118d66f1dbe00ac1261311cc17e0 /pyaggr3g470r/emails.py | |
parent | Bugfix. (diff) | |
download | newspipe-a14da171a0cd3f5023e97b6b36e6f8edee91376e.tar.gz newspipe-a14da171a0cd3f5023e97b6b36e6f8edee91376e.tar.bz2 newspipe-a14da171a0cd3f5023e97b6b36e6f8edee91376e.zip |
test account activation by admin.
Diffstat (limited to 'pyaggr3g470r/emails.py')
-rw-r--r-- | pyaggr3g470r/emails.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/pyaggr3g470r/emails.py b/pyaggr3g470r/emails.py index c4bcb61f..9507d3ae 100644 --- a/pyaggr3g470r/emails.py +++ b/pyaggr3g470r/emails.py @@ -70,7 +70,25 @@ def new_account_notification(user): try: plaintext = """Hello,\n\nYour account has been created. Click on the following link to confirm it:\n%s\n\nSee you,""" % \ (conf.PLATFORM_URL + 'confirm_account/' + user.activation_key) - + + message = PMMail(api_key = conf.POSTMARK_API_KEY, + subject = "[pyAggr3g470r] Account activation", + sender = conf.ADMIN_EMAIL, + to = user.email, + text_body = plaintext) + + message.send() + except Exception as e: + raise e + else: + pass + +def new_account_activation(user): + if conf.ON_HEROKU: + try: + plaintext = """Hello,\n\nYour account has been activated. You can now connect to the platform:\n%s\n\nSee you,""" % \ + (conf.PLATFORM_URL) + message = PMMail(api_key = conf.POSTMARK_API_KEY, subject = "[pyAggr3g470r] Account activation", sender = conf.ADMIN_EMAIL, @@ -82,8 +100,6 @@ def new_account_notification(user): raise e else: pass - - def new_article_notification(user, feed, article): send_email(conf.ADMIN_EMAIL, user.email, feed, article)
\ No newline at end of file |