我正在使用EmailMultiAlternatives
将邮件发送到收件人列表。
context = Context({'cc': cc, 'link': link})
html_template = loader.get_template('email_new.html')
text_template = loader.get_template('email_new.txt')
from_email = 'afeld <afeld@has_questions.com>'
recipient_list = ['%s <%s>' % (e.full_name(), e.email()) for e in cc.not_responded()]
cc_list = ['%s <%s>' % (e.full_name(), e.email()) for e in cc.notification_recipients()]
message = EmailMultiAlternatives(
subject,
text_template.render(context),
from_email,
to=recipient_list,
cc=cc_list
)
是否可以在正文中收到电子邮件的收件人?在我的email.html中看起来像什么
dear {{ recipient }}
from afeld
如何从recipient_list获取{{ recipient }}
?