|
6 | 6 | from django.conf import settings |
7 | 7 | from django.template.loader import render_to_string |
8 | 8 | from django.template import RequestContext |
| 9 | +from ietf.utils import log |
9 | 10 |
|
10 | 11 | def add_headers(msg): |
11 | 12 | if not(msg.has_key('Message-ID')): |
@@ -34,6 +35,7 @@ def send_smtp(msg): |
34 | 35 | server.login(settings.EMAIL_HOST_USER, settings.EMAIL_HOST_PASSWORD) |
35 | 36 | server.sendmail(frm, to, msg.as_string()) |
36 | 37 | server.quit() |
| 38 | + log("sent email from '%s' to '%s' subject '%s'" % (frm, to, msg.get('Subject', '[no subject]'))) |
37 | 39 |
|
38 | 40 | def copy_email(msg, to): |
39 | 41 | ''' |
@@ -62,7 +64,7 @@ def send_mail_subj(request, to, frm, stemplate, template, context, cc=None, extr |
62 | 64 | Send an email message, exactly as send_mail(), but the |
63 | 65 | subject field is a template. |
64 | 66 | ''' |
65 | | - subject = render_to_string(template, context, context_instance=RequestContext(request)) |
| 67 | + subject = render_to_string(stemplate, context, context_instance=RequestContext(request)) |
66 | 68 | return send_mail(request, to, frm, subject, template, context, cc, extra) |
67 | 69 |
|
68 | 70 | def send_mail(request, to, frm, subject, template, context, cc=None, extra=None): |
|
0 commit comments