javamail正文亂碼html
網上各類方式嘗試了都沒有找到解決方法,其中用Base64Encode 這個是jre下的rt包,因爲在maven庫中找了半天沒有找到java
。就放棄了。maven
後來看到 MimeBodyPart htmlPart.setContent(object o, String type);的type 和兩年前學servlet亂碼同樣就採用htmlPart.setContent(htmlContent, "text/html;charset=utf-8");spa
效果圖code