Mercurial > public > sg101
comparison gpp/core/functions.py @ 180:aef00df91165
Implement #63, add a queued email facility.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 21 Mar 2010 20:33:33 +0000 |
parents | b7ac381996e8 |
children | 500e5875a306 |
comparison
equal
deleted
inserted
replaced
179:70b2e307c866 | 180:aef00df91165 |
---|---|
11 """The main gpp send email function. | 11 """The main gpp send email function. |
12 Use this function to send email from the site. It will obey debug settings and | 12 Use this function to send email from the site. It will obey debug settings and |
13 log all emails. | 13 log all emails. |
14 """ | 14 """ |
15 | 15 |
16 if settings.GPP_SEND_EMAIL: | 16 if settings.MAILER_ENQUEUE_MAIL: |
17 mailer.enqueue_mail(subject, message, from_email, recipient_list) | |
18 elif settings.GPP_SEND_EMAIL: | |
17 django.core.mail.send_mail(subject, message, from_email, recipient_list, | 19 django.core.mail.send_mail(subject, message, from_email, recipient_list, |
18 fail_silently, auth_user, auth_password) | 20 fail_silently, auth_user, auth_password) |
19 | 21 |
20 import logging | 22 import logging |
21 logging.debug('EMAIL:\nFrom: %s\nTo: %s\nSubject: %s\nMessage:\n%s' % | 23 logging.debug('EMAIL:\nFrom: %s\nTo: %s\nSubject: %s\nMessage:\n%s' % |