aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/emails.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-20 08:04:10 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-20 08:04:10 +0200
commitbe992ebb57dcd40751fa8887da74f912a7228fd2 (patch)
treecc5493101cf9c59e027be81c5b16069b15d7881d /pyaggr3g470r/emails.py
parentFix (diff)
downloadnewspipe-be992ebb57dcd40751fa8887da74f912a7228fd2.tar.gz
newspipe-be992ebb57dcd40751fa8887da74f912a7228fd2.tar.bz2
newspipe-be992ebb57dcd40751fa8887da74f912a7228fd2.zip
Real FFix
Diffstat (limited to 'pyaggr3g470r/emails.py')
-rw-r--r--pyaggr3g470r/emails.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/pyaggr3g470r/emails.py b/pyaggr3g470r/emails.py
index 2bee64cf..77546138 100644
--- a/pyaggr3g470r/emails.py
+++ b/pyaggr3g470r/emails.py
@@ -72,13 +72,11 @@ def send_heroku(user=None, bcc="", subject="", plaintext=""):
try:
message = PMMail(api_key = conf.POSTMARK_API_KEY,
subject = subject,
- to = user.email,
sender = conf.ADMIN_EMAIL,
text_body = plaintext)
- if bcc != "" and None == user:
+ if bcc != "":
message.bcc = bcc
- message.to = ""
- elif bcc == "" and None != user:
+ elif bcc == "":
message.to = user.email
message.send()
except Exception as e:
@@ -106,7 +104,7 @@ def new_account_notification(user):
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)
if conf.ON_HEROKU:
- send_heroku(user=user, bcc="", subject="[pyAggr3g470r] Account creation", plaintext=plaintext)
+ send_heroku(user=user, subject="[pyAggr3g470r] Account creation", plaintext=plaintext)
else:
pass
@@ -117,7 +115,7 @@ def new_account_activation(user):
plaintext = """Hello,\n\nYour account has been activated. You can now connect to the platform:\n%s\n\nSee you,""" % \
(conf.PLATFORM_URL)
if conf.ON_HEROKU:
- send_heroku(user=user, bcc="", subject="[pyAggr3g470r] Account activated", plaintext=plaintext)
+ send_heroku(user=user, subject="[pyAggr3g470r] Account activated", plaintext=plaintext)
else:
pass
bgstack15