无法将 javascript 文件作为电子邮件附件发送
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17620020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to send javascript file as email attachment
提问by user2284926
Hotmail does not allow javascript files to be attached to emails , what are the reasons behind it ??
Hotmail 不允许将 javascript 文件附加到电子邮件中,这背后的原因是什么?
回答by mti2935
An easy way around this is just to rename the file with a .txt extension instead of the .js extension.
解决此问题的一种简单方法是使用 .txt 扩展名而不是 .js 扩展名重命名文件。
回答by Jay Lane
reasoning found in a 2010 blog post:
在 2010 年的博客文章中发现的推理:
"Because they're "executable". They are, fundamentally, computer programs or can be treated as computer programs.
And as computer programs, they can carry malware."
“因为它们是“可执行的”。从根本上说,它们是计算机程序,或者可以被视为计算机程序。
作为计算机程序,它们可以携带恶意软件。”
Hotmail blocks a lot of attachment types, the old work around was to either remove the filename extension on transfer ie (this.js = this) and have the receiver append the extension when they download the file on their end, or compress it in a zip archive.
Hotmail 阻止了很多附件类型,旧的解决方法是在传输时删除文件扩展名 ie (this.js = this) 并让接收者在他们最后下载文件时附加扩展名,或者将其压缩为压缩存档。
回答by Jason
Email clients do not normally allow emails to be sent with any form of JavaScript because it could be used to install malware on the recipient's computer. There was a huge issue with older email clients because they did allow JavaScript. As a result anyone using those clients could fall victim to chain mail with malware "strapped on."
电子邮件客户端通常不允许使用任何形式的 JavaScript 发送电子邮件,因为它可用于在收件人的计算机上安装恶意软件。较旧的电子邮件客户端存在一个大问题,因为它们确实允许使用 JavaScript。因此,任何使用这些客户端的人都可能成为“捆绑”恶意软件的连锁邮件的受害者。
Nowadays you can open any email safely without worrying about downloading any viruses. You can, however, still get viruses by clicking on any links within the email that lead to malicious websites; so don't click on any email links unless you know they are safe.
如今,您可以安全地打开任何电子邮件,而无需担心下载任何病毒。但是,您仍然可以通过单击电子邮件中指向恶意网站的任何链接来感染病毒;所以不要点击任何电子邮件链接,除非你知道它们是安全的。
回答by Mikael Finstad
For me the only thing that helped was to rename the file to something else, like .jss
and ask the recipient to rename it back.
对我来说,唯一有帮助的是将文件重命名为其他名称,例如.jss
并要求收件人将其重命名。