Sending html email having JQuery scripts

前端 未结 5 1648
醉话见心
醉话见心 2021-01-12 07:48

I\'m using PHP to send html emails. I\'ve tried to import css files inside the email, and it works fine.



        
5条回答
  •  离开以前
    2021-01-12 08:26

    Most email clients either disable email JavaScript entirely, or only allow a subset of it, due to security reasons. Web-based clients such as Gmail are likely to fall into the former category.

    You can try embedding the script file itself directly into the email, but overall using JS in emails is a bad idea that's best avoided.

    edit

    Remember, email is a static content-delivery mechanism. As another commentator noted, if you want to send someone dynamic content, email them a link to your DHTML webpage.

提交回复
热议问题