Javascript可以发送电子邮件吗? [英] Can Javascript send emails??

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

问题描述




我正在为客户建立一个网站,上面有一个查询表格。

通常情况下我会像PHP一样发送表单,但客户端没有b $ b想要支付支持PHP的服务器,因此表单是使用< form>中的

mailto:命令发送的。标签。这发送电子邮件很好,但它是

而不是messey。我可以使用javascript来整理表单输出然后

发送一封包含内容的电子邮件,类似于PHP中的邮件命令吗?


大大收到的任何帮助或建议!!

Hi,

I am building a site for a client which has an enquiry form on it.
Normally I would something like PHP to send the form but the client doesn''t
want to pay for a server that supports PHP, so the form is sent using the
mailto: command within the <form> tag. This sends the email fine but it is
rather messey. Could I use javascript to tidy up the form output and then
send an email with the contents, similar to the ''Mail'' command in PHP?

Any help or advice greatly received!!

推荐答案

Richard H写道:
Richard H wrote:


我正在为客户建立一个网站,上面有一个查询表格。
通常我会像PHP一样发送表格,但客户不想支付对于支持PHP的服务器,因此使用< form>中的
mailto:命令发送表单。标签。这样可以发送电子邮件,但它确实是电子邮件。我可以使用javascript整理表单输出然后
发送包含内容的电子邮件,类似于PHP中的邮件命令吗?
Hi,

I am building a site for a client which has an enquiry form on it.
Normally I would something like PHP to send the form but the client doesn''t
want to pay for a server that supports PHP, so the form is sent using the
mailto: command within the <form> tag. This sends the email fine but it is
rather messey. Could I use javascript to tidy up the form output and then
send an email with the contents, similar to the ''Mail'' command in PHP?




相当混乱使用mailto:意味着默认

电子邮件客户端的存在和正确配置,这并不是每个人都可以使用的东西,这是一种保守的说法。


他们。更糟糕的是,那些与客户网站有问题的人是最需要与他们联系的人,最不可能的是能够做到

所以。


告诉你的客户用他们的
$ b $来支付额外的PHP或Perl支持。 b网站托管服务提供商并正确完成。


客户端JavaScript不允许您以任何方式清理生成的

电子邮件,使用适当的服务器端解决方案。


-

Grant Wagner< gw ***** @ agricoreunited.com>

comp.lang.javascript常见问题 - http://jibbering.com/faq



"Rather messy" is an understatement.

Using mailto: implies the existance and proper configuration of a "default
E-mail client", something not everyone has available to them. Worse still, the
very people who are having problems with your customer''s Web site are the ones
most in need of contact with them, and the ones least likely to be able to do
so.

Tell your client to cough up the extra bucks for PHP or Perl support with their
Web hosting provider and do it correctly.

Client-side JavaScript is not going to allow you to clean up the resulting
E-mail in any way, use a proper server-side solution.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


2004年9月15日星期三18:21:47 GMT格兰特瓦格纳

< gw ***** @ agricoreunited.com>写道:


[snip]
On Wed, 15 Sep 2004 18:21:47 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:

[snip]
告诉你的客户用他们的网络掏出PHP或Perl支持额外的钱托管服务提供商并正确完成。
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.




如果他们真的想以便宜的价格购买,他们可以使用免费的

服务之一或者提供形式邮件的成本低于全部

服务器端支持(如果你期望高流量)。


理查德:


我见过免费网络主机提供表单邮件,即使PHP不在

问题中。这可能是一个想法,看看你的客户的主机是否已经提供了一个

脚本。


[snip]


Mike


-

Michael Winter

替换.invalid与.uk通过电子邮件回复。



If they really want to do it on the cheap, they could use one of the free
services, or one which offers form mail at a lower cost than full
server-side support (if you expect high traffic).

To Richard:

I''ve seen free web hosts provide form mail, even if PHP was out of the
question. It might be an idea to see if your client''s host provides a
script already.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


Grant Wagner写道:
Grant Wagner wrote:
告诉你的客户为PHP付出额外的钱Perl支持与他们的Web托管服务提供商合作并正确执行。
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.




我在Linux和Windows上运行PHP和Linux上的Perl(我相信

还有一个在Windows上运行的PHP)。从来没有咳嗽任何

一点钱?你们在哪里得到PHP和/或Perl并咳嗽

钱?

-

未来历史学家将能够在杰拉尔德福特图书馆;

吉米卡特图书馆;罗纳德里根图书馆和比尔克林顿

成人书店。



I have run PHP on Linux and Perl on both Linux and Windows (I believe
there''s also a PHP that runs on Windows). Never had to "cough up" any
bucks at all? Where are you guys getting PHP and/or Perl and coughing up
money?
--
Future historians will be able to study at the Gerald Ford Library; the
Jimmy Carter Library; the Ronald Reagan Library and the Bill Clinton
Adult Bookstore.


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

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