我正在像这样使用 django send_mail:
from django.core.mail import send_mail
send_mail('Test', 'asdfasdfasdf\nasdfasfasdfasdf\nasdfasdfasdf', 'sender@test.com', ['receiver@test.com'], fail_silently=False)
Gmail 会收到此信息。
Content-type: multipart/alternative; boundary="----------=_1382512224-21042-56"
------------=_1382512224-21042-56
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
asdfasdfasdf
asdfasfasdfasdf
asdfasdfasdf
------------=_1382512224-21042-56
Content-Type: text/html; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
<html><body>
<p>asdfasdfasdf asdfasfasdfasdf asdfasdfasdf</p>
</body></html>
并将我的换行符显示为一个完整的段落。为什么?我想要三行文字,而不是一行。