[英]sending dynamic html email containing javascript via a python script
The question is, I have a normal html page(basically it contains a that is generated from bokeh package in python, and all it does is generating an html page the javascript within renders a nice zoomable plot when viewed in a browser. 问题是,我有一个普通的html页面(基本上它包含一个由python的bokeh包生成的页面,它所做的只是生成一个html页面,当在浏览器中查看时,其中的javascript呈现了一个不错的可缩放绘图。
My aim is to send that report (the html basically) over to recipients in a mail. 我的目的是通过邮件将该报告(基本上是html)发送给收件人。
Sorry, but you'll not be able to send an email with JavaScript embedded. 抱歉,您将无法发送带有JavaScript的电子邮件。 That is a security risk.
那是安全隐患。 If you're lucky, an email provider will strip it before rendering, if you're unlucky, you'll be sent directly to spam and the provider will distrust your domain.
如果幸运的话,电子邮件提供商将在呈现之前将其删除。如果不幸的话,您将被直接发送到垃圾邮件,提供商将不信任您的域。
You're better off sending an email with a link to the chart. 您最好发送一封带有图表链接的电子邮件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.