Merged [2604] from rjsparks@nostrum.com: Added filename to the subject of Protocol Action and Document Action email messages.
Fixed a bug that was preventing CC/BCC from being honored. Fixes issue #528. - Legacy-Id: 2623 Note: SVN reference [2604] has been migrated to Git commit 4d27ae4d7a535fb7c9cb44dd0d486a0f5850b1b1
This commit is contained in:
parent
085cb171c3
commit
6d6d3aac51
|
@ -178,7 +178,9 @@ class InternetDraft(models.Model):
|
|||
def displayname(self):
|
||||
return self.filename
|
||||
def file_tag(self):
|
||||
return "<%s-%s.txt>" % (self.filename, self.revision_display())
|
||||
return "<%s>" % (self.filename_with_rev())
|
||||
def filename_with_rev(self):
|
||||
return "%s-%s.txt" % (self.filename, self.revision_display())
|
||||
def group_acronym(self):
|
||||
return self.group.acronym
|
||||
def group_ml_archive(self):
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From: The IESG <iesg-secretary@ietf.org>
|
||||
To: IETF-Announce <ietf-announce@ietf.org>{% if cc %}
|
||||
Cc: {{ cc|safe }}{% endif %}
|
||||
Subject: {{ action_type }} Action: '{{ doc.title }}' to {{ status }}
|
||||
Subject: {{ action_type }} Action: '{{ doc.title }}' to {{ status }} ({{ doc.filename_with_rev|safe }})
|
||||
|
||||
{% filter wordwrap:73 %}The IESG has approved the following document{{ docs|pluralize }}:{% for d in docs %}
|
||||
- '{{ d.filled_title }}'
|
||||
{{ d.file_tag|safe }} as {{ d.full_status }}{% endfor %}
|
||||
({{ d.filename_with_rev|safe }}) as {{ d.full_status }}{% endfor %}
|
||||
|
||||
{{ made_by }}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ def send_mail_text(request, to, frm, subject, txt, cc=None, extra=None, toUser=N
|
|||
else:
|
||||
msg = MIMEText(txt)
|
||||
|
||||
send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=None, bcc=None)
|
||||
send_mail_mime(request, to, frm, subject, msg, cc, extra, toUser, bcc)
|
||||
|
||||
def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=None, bcc=None):
|
||||
"""Send MIME message with content already filled in."""
|
||||
|
@ -169,4 +169,5 @@ def send_mail_preformatted(request, preformatted):
|
|||
extra headers as needed)."""
|
||||
|
||||
msg = message_from_string(preformatted.encode("utf-8"))
|
||||
|
||||
send_mail_text(request, msg['To'], msg["From"], msg["Subject"], msg.get_payload(), cc=msg["Cc"], bcc=msg["Bcc"])
|
||||
|
|
Loading…
Reference in a new issue