PHP displaying html email in a html page

前端 未结 4 656
误落风尘
误落风尘 2021-01-12 11:26

I\'m building an PHP email mailbox script.

How would I make html emails display cleanly as they do in gmail/hotmail.

If I just echo it out it affects the who

4条回答
  •  庸人自扰
    2021-01-12 12:04

    If you are looking for the 'best solution' get on board with another open source email library that is doing the same thing you are. Maintaining an email renderer on your own that is safe against script injection and other hacks will simply be too much work for one person.

    One example: https://github.com/afterlogic/webmail-lite

    Another: http://trac.roundcube.net/

    You get the benefit of other developers who use the library maintaining the code base, so if something is broken, all you have to do is pull the latest update (hopefully) and you get the fix. If you find something that needs improving, you can fix it or build it, and make the code better for everyone. I'm really just pitching open source libraries here, however in any commercial context, building your own email renderer without a big team, is a bad idea.

提交回复
热议问题