问题描述
我很难用JavaMail API编写出色的(布局明智的)html电子邮件。
我知道如何在电子邮件正文中添加图片,然后在上方和下方添加文字,但这就是它。我真的希望创建一些更复杂的布局,包括一些分隔符,图像边框,较大的文本标题等等。
我需要了解html才能创建这个,或者没有人知道如何使用html JavaMail的一个很好的指南或教程?
希望这个问题不是抽象为stackoverflow,谢谢。
这不是JavaMail问题。
$ b 撰写您的html随你怎么便。然后使用MimeBodyPart setText(content,charset,html)方法。
I'm having a hard time trying to compose a great looking (layout wise) html email with JavaMail API.
I know how to add a picture inside the email body, and then add text above and below, but that's kinda it. I'm really hoping to create a little more complex layout with some separators, image borders, larger text titles and so on.
Would I need to know html in order to create this, or does anyone know of a good guide or tutorial on how to work with html JavaMail?
Hope this question isn't to abstract for stackoverflow, thanks.
This is not a JavaMail problem.
Compose your html however you want. Then use the MimeBodyPart setText(content, charset, "html") method.
这篇关于使用JavaMail API在html电子邮件中进行布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!