|
14 | 14 |
|
15 | 15 | from ietf.dbtemplate.forms import DBTemplateForm |
16 | 16 | from ietf.utils import unaccent |
17 | | -from ietf.utils.mail import send_mail |
| 17 | +from ietf.utils.mail import send_mail, send_mail_text |
18 | 18 | from ietf.ietfauth.decorators import role_required |
19 | 19 | from ietf.utils import fields as custom_fields |
20 | 20 | from ietf.group.models import Group, Role |
|
25 | 25 | from ietf.nomcom.utils import QUESTIONNAIRE_TEMPLATE, NOMINATION_EMAIL_TEMPLATE, \ |
26 | 26 | INEXISTENT_PERSON_TEMPLATE, NOMINEE_EMAIL_TEMPLATE, \ |
27 | 27 | NOMINATION_RECEIPT_TEMPLATE, FEEDBACK_RECEIPT_TEMPLATE, \ |
28 | | - get_user_email, get_hash_nominee_position, get_year_by_nomcom |
| 28 | + get_user_email, get_hash_nominee_position, get_year_by_nomcom, \ |
| 29 | + HEADER_QUESTIONNAIRE_TEMPLATE |
29 | 30 | from ietf.nomcom.decorators import member_required |
30 | 31 |
|
31 | 32 | ROLODEX_URL = getattr(settings, 'ROLODEX_URL', None) |
@@ -426,9 +427,13 @@ def save(self, commit=True): |
426 | 427 | to_email = email.address |
427 | 428 | context = {'nominee': email.person.name, |
428 | 429 | 'position': position.name} |
| 430 | + path = '%s%d/%s' % (nomcom_template_path, |
| 431 | + position.id, HEADER_QUESTIONNAIRE_TEMPLATE) |
| 432 | + body = render_to_string(path, context) |
429 | 433 | path = '%s%d/%s' % (nomcom_template_path, |
430 | 434 | position.id, QUESTIONNAIRE_TEMPLATE) |
431 | | - send_mail(None, to_email, from_email, subject, path, context) |
| 435 | + body += '\n\n%s' % render_to_string(path, context) |
| 436 | + send_mail_text(None, to_email, from_email, subject, body) |
432 | 437 |
|
433 | 438 | # send emails to nomcom chair |
434 | 439 | subject = 'Nomination Information' |
|
0 commit comments