Django:如何发送包含嵌入图像的HTML电子邮件 [英] Django: How to send HTML emails with embedded images

查看:161
本文介绍了Django:如何发送包含嵌入图像的HTML电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何发送嵌入图像的HTML电子邮件? HTML应该如何链接到图像?图片应该添加为MultiPart电子邮件附件?

How can I send HTML emails with embedded images? How the HTML should link to the images? The images should be added as MultiPart email attach?

任何一个例子都非常感激。

Any example is very appreciated.

推荐答案

http://djangosnippets.org/snippets/285/

您必须使用MultiPart和cid :.使用图像发送html邮件几乎总是一个坏主意。它给垃圾邮件点邮件和smtp服务器...

You have to use MultiPart and cid:. It is almost always a bad idea to send html mails with images. It gives spam points to your mail and smtp server ...

这篇关于Django:如何发送包含嵌入图像的HTML电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆