EmailClient.forge_message(): fix handling sender_name
This commit is contained in:
parent
fac20864ce
commit
c391b68dae
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ class EmailClient(object):
|
||||||
"""
|
"""
|
||||||
msg = MIMEMultipart('alternative')
|
msg = MIMEMultipart('alternative')
|
||||||
msg['To'] = email.utils.formataddr(rcpt_to) if isinstance(rcpt_to, tuple) else rcpt_to
|
msg['To'] = email.utils.formataddr(rcpt_to) if isinstance(rcpt_to, tuple) else rcpt_to
|
||||||
msg['From'] = email.utils.formataddr((sender_email or self.sender_name, sender_email or self.sender_email))
|
msg['From'] = email.utils.formataddr((sender_name or self.sender_name, sender_email or self.sender_email))
|
||||||
if subject:
|
if subject:
|
||||||
msg['Subject'] = subject.format(**template_vars)
|
msg['Subject'] = subject.format(**template_vars)
|
||||||
msg['Date'] = email.utils.formatdate(None, True)
|
msg['Date'] = email.utils.formatdate(None, True)
|
||||||
|
|
Loading…
Reference in a new issue