From 63b5d2f84a3b44f3a8210dc8c14940a032b252bf Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 20 May 2014 07:58:21 +0200 Subject: Fix --- pyaggr3g470r/emails.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pyaggr3g470r/emails.py') diff --git a/pyaggr3g470r/emails.py b/pyaggr3g470r/emails.py index 5b80fce0..504e5d29 100644 --- a/pyaggr3g470r/emails.py +++ b/pyaggr3g470r/emails.py @@ -72,10 +72,12 @@ def send_heroku(user=None, bcc="", subject="", plaintext=""): try: message = PMMail(api_key = conf.POSTMARK_API_KEY, subject = subject, + message.to = user.email, sender = conf.ADMIN_EMAIL, text_body = plaintext) if bcc != "" and None == user: message.bcc = bcc + message.to = "" elif bcc == "" and None != user: message.to = user.email message.send() @@ -104,7 +106,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, subject="[pyAggr3g470r] Account creation", plaintext=plaintext) + send_heroku(user=user, bcc="", subject="[pyAggr3g470r] Account creation", plaintext=plaintext) else: pass @@ -115,7 +117,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, subject="[pyAggr3g470r] Account activated", plaintext=plaintext) + send_heroku(user=user, bcc="", subject="[pyAggr3g470r] Account activated", plaintext=plaintext) else: pass -- cgit