Django -- 发送HTML格式的邮件
提前在setting中设置邮箱server
from django.core.mai import EmailMessage
subject, from_email, to = 'xxx', 'noreplay.com', ['xxx'] html_content = "<p>This is an <font size=3 color='green'><strong>important</strong></font> message.</p>" msg = EmailMessage(subject, msg1, from_email, ['xxx']) msg.content_subtype = 'html' msg.send()
I can feel you forgetting me。。
有一种默契叫做我不理你,你就不理我