如何在创建带有速度的电子邮件时呈现HTML? [英] How do I get HTML rendered in creating email message with velocity?

查看:104
本文介绍了如何在创建带有速度的电子邮件时呈现HTML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用velocity创建一个字符串编写器,然后将它合并到一个模板中。模板#包括html来制作一个简单的表格,但只有原始的HTML显示在电子邮件中......它不会被渲染。电子邮件正从Google服务器发送到Outlook客户端。
任何人都可以告诉我如何将HTML呈现到用Velocity创建的电子邮件中?



谢谢!

Content-type:text / html 标头。



Appart从这里开始,你必须意识到所有不同的电子邮件客户端可能会剥离HTML标签和功能(例如样式),因此您必须尝试不同的电子邮件客户端并尝试坚持非常基本的功能集。

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!

解决方案

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.

这篇关于如何在创建带有速度的电子邮件时呈现HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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