Prevent text in email sending from Java function word-break

Question:

From: noreply@noreply.com
Sent: Friday, March 23, 2018 4:41 PM
To: noreply@noreply.com
Subject:  Report 

 

Text :

Text that want to keep integrity.

The words in text will be split when reducing the size and I want to keep the integrity of the words.

e.g. 

Text that want to ke

ep integrity

 

The format I would like to keep:

Text that want to

keep integrity

 

Details:

This email was sent from a function after sumbitting report. Text in html used textarea to store

<textarea class="form-control" name="text" maxlength="254"></textarea>

At first, I thought it should be the limitation of textarea break the word, and found that outlook does not support some tags in html including textarea. I tryed to use  wrap="soft/off" and found it only works in the html page and does not have relation with email. However, after checking, the email was related with a email template and the it used nowrap and word-break:break-all which resulted word breaking. To solve the problem, I remove nowrap and word-break:break-all. 

<tr>
<td valign="top" nowrap><b>${text}</b></td>
<td><pre style="font-family:Arial;font-size:14px;"word-break:break-all;>${text}</pre></td>
</tr>

posted @ 2018-03-24 13:12  KIKI_FAN  阅读(119)  评论(0编辑  收藏  举报