从Javascript发送电子邮件 [英] Emailing from Javascript

查看:168
本文介绍了从Javascript发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个话题已经从各个角度讨论了,但是我不确定我是否已经看到我特定问题的答案。

I know this topic has been covered from all sorts of angles but I'm not sure I've seen the answer to my specific question.

我正在写HTML5,CSS和Javascript的原型网页。我希望用户能够浏览到要附加的文件,然后将该文件附加到我发送到已设置的特定电子邮件地址的电子邮件中。我不希望用户的默认电子邮件程序弹出。

I am writing a prototype web page in HTML5, CSS, and Javascript. I want the user to be able to browse to a file to attach then attach that file to an email I send to a specific email address I've setup. I don't want the user's default email program to pop up.

我有公司内部网中SMTP服务器的地址,但目前无法访问服务器以放置服务器端代码。在网页上,用户将知道涉及到电子邮件,但是我不希望他们除了选择文件并单击没有弹出其他屏幕的按钮外,不必做其他事情。

I have addresses to SMTP servers within my companies intranet but I don't have access to a server at the moment to put server-side code on. On the web page the user will know email is involved but I don't want them to have to do a thing other than select the file and click a button with no other screens popping up.

我知道如何使用mailto来发送电子邮件,但是我认为您不能将其与附件一起使用。

I know how to use mailto in order to send an email but I don't think you can use that with attachments.

反正还有吗这不必弄乱服务器端吗?是否知道我拥有足够权限的smtp服务器地址?同样,这是一个原型,但可能是产品新功能的基础。

Is there anyway to do this without having to mess with the server side? Is knowing an smtp server address that I have permissions on enough? Again, this is a prototype but possibly the basis for a new feature on a product.

谢谢!

推荐答案


有什么办法做到这一点而不必弄乱服务器端吗?

Is there anyway to do this without having to mess with the server side?

不会,除非目标浏览器公开了SMTP客户端对象,否则不会。 (而且我认为没有任何作用。这会使垃圾邮件僵尸网络的构建变得相当容易...)

Nope, not unless the target browser has exposes an SMTP client object. (And I don't think any do. That would make spam botnets quite a bit easier to build...)

您需要在服务器上执行此操作。

You need to do this on the server.

这篇关于从Javascript发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆