Layout in html email with JavaMail API

2019-09-16 10:52发布

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.

1条回答
Fickle 薄情
2楼-- · 2019-09-16 11:14

This is not a JavaMail problem.

Compose your html however you want. Then use the MimeBodyPart setText(content, charset, "html") method.

查看更多
登录 后发表回答