使用JavaMail的表 [英] Tables using JavaMail

查看:117
本文介绍了使用JavaMail的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JavaMail发送电子邮件,我想将我的消息数据放入将嵌入电子邮件的表中。接收消息的人将看到包含填充数据的表格。我该怎么做?

I am sending an e-mail using JavaMail and I want to put my message data into a table that will be embedded in the e-mail. The person receiving the message will see the table with the filled in data. How do I go about doing this?

推荐答案

我猜你的意思是HTML表格?

I guess you mean HTML table?

StringBuilder sb = new StringBuilder();
sb.append("<html><body><table><tr><td>Bubu<td>Lala</tr></table></body></html>");
MimeMessage msg = ...;
msg.setContent(sb.toString(), "text/html");

这篇关于使用JavaMail的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆