How do I get HTML rendered in creating email message with velocity?

久未见 提交于 2019-12-25 03:07:09

问题


I use velocity to create a string writer, then merge that into a template. The template #includes html to make a simple table, yet only the raw HTML shows up in the email... it does not get rendered. Email is being sent from Google server to outlook client. Can anyone tell me How can I get rendered HTML into an email message created with Velocity?

Thanks!


回答1:


You have to set a Content-type: text/html header.

Appart from that, you have to be aware that all the different email clients may strip the HTML tags and features (for example, styles), so you have to experiment with different email clients and try to stick to a very basic feature set.



来源:https://stackoverflow.com/questions/22411904/how-do-i-get-html-rendered-in-creating-email-message-with-velocity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!