从Play Java发送的Outlook 365电子邮件中的换行符

时间:2017-04-18 21:53:34

标签: java html email playframework outlook

当我尝试使用Play框架的电子邮件实用程序作为“text / html”发送以下注释时,新行未被保留

     **Original string**
     this is a test
     this is a test

但我在电子邮件中看到的是在Outlook或Java中放弃的新行换行

     **Result**
     this is a test this is a test 

我已经尝试了下面的所有建议,将br,\ n,\ r \ n,\ t \ t \ t等添加到我的程序中,仍然无法正常显示新行

How do I format a String in an email so Outlook will print the line breaks?

1 个答案:

答案 0 :(得分:1)

如果您的数据是HTML,则换行符是<br> HTML元素。

相关问题