【发布时间】:2015-12-17 13:32:42
【问题描述】:
好的,下面是我的电子邮件模板:
<html>
<head>
{% load staticfiles %}
</head>
<body>
<h2>Welcome!</h2>
<img src = "{% static 'app/images/logo1.png' %}" style = "position: absolute; left: 5%; height: 100%; width:50%;" />
<div style = "position: absolute; top: 100%; left: 0%; height: 10%; width: 100%: color: #006699;"></div>
<img src = "{% static 'app/images/content.png' %}" style = "position: absolute; left:0%; top: 110%; height: 100%; width: 60%">
</img>
</body>
</html>
以下是我的电子邮件功能:
html_template = render_to_string('email_template.html', {})
try:
send_mail(
'Title',
'Plaintext Version Goes Here',
'sender',
[email],
html_message=html_template,
)
except:
return HttpResponse("No!")
当我只发送邮件时欢迎!打印在邮件中。图像不显示。知道为什么吗?
提前致谢!
【问题讨论】: