使用HTML表单中的javascript发送电子邮件 [英] Send email using javascript from HTML form

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

问题描述

大家好,



我正在创建一个HTML表单,并希望通过此表单发送电子邮件。我不想使用PHP脚本发送电子邮件。我需要任何java脚本ya jquery代码通过这个html表单发送电子邮件。



请帮助我。请发给我任何链接或解决方案

Hi everyone,

I am creating a HTML form and want to send email through this form. I don't want to use PHP Script to send email. I need any java script ya jquery code to send email through this html form.

please help me. please send me any link or solution

推荐答案

使用JavaScript发送电子邮件是你最糟糕的想法!

请记住,JavaScript运行INSIDE客户端的浏览器,出于安全考虑,它无法访问操作系统!

因此,尝试发送电子邮件的唯一方法是使用 mailto 协议,并假设客户端使用某种桌面邮件客户端。这可能是一个错误的假设,会导致用户完全混淆......

不止于此!

您想向谁发送该电子邮件?您当前的用户?!他在你的网站上 - 给他看一条消息!

谁是发件人?目前的用户?或者您的系统?

我建议您检查您的应用程序设计和需求!!!
Using JavaScript to send email is the worst idea you ever had!
Remember that JavaScript runs INSIDE the client's browser and for security reasons it has no access the the OS!
So the only way to even try to send email is using the mailto protocol, and that assumes client using some kind of desktop mail client. That can be a false assumption that will lead the user to total confusion...
More than that!
To who do you want to send that email? Your current user?! He is on your website - show him a message!
And who is the sender? The current user? Or your system?
I advise you to review your application design and needs!!!


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

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