开发者

Storing HTML Templates versus Generating HTML Templates

开发者 https://www.devze.com 2023-02-11 23:59 出处:网络
This is rather a discussion I\'m trying to start to get a better insight on how other people solve this problem:

This is rather a discussion I'm trying to start to get a better insight on how other people solve this problem:

On our web application we currently have the ability to store HTML snippets and pages in the database and render them or use them for email templates. Users have the ability to create or 开发者_如何学编程modifiy these templates.

Because we're expanding the functionality of the application, we rely on emails to deliver messages to the users of the application. These emails rely on the templates as well to generate content. The problem is that the emails are starting to get some high scores on the SPAM filters due the content of the HTML Snippets.

As a proof of concept I wish to remove the ability to create/modify these snippets and make them HTML compliant to reduce the SPAM scoring. The discussion i'd like to start now: Would you store these snippets in the database and call upon them when needed, or would you go with a hieracy of classes that can generate the correct HTML by accepting the required parameters?

What would you do and why?


You can generate PDF from any html you want and then send to user email. I do this way.


Have you taken a look at PostageApp?

It has the ability to create HTML + CSS templates with automatic in-lining, which makes your design a lot easier. In addition, the preview function of the templates will let you know if you have used any invalid HTML or CSS markups, which might get flagged as spammy.

(Full Disclosure: I am the Product Manager of PostageApp.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号