如何将邮件从静态网站.htm发送到不同网站上的php服务器? [英] How do I send mail from a static website .htm to a php server on a different website?

查看:79
本文介绍了如何将邮件从静态网站.htm发送到不同网站上的php服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开展一个项目,其中该站点是静态的,并且服务器没有安装php或任何其他动态服务器端的语言。我注意到像用户声明这样的公司,以某种方式从静态网站获取数据到他们的服务器。如何在我的静态无php服务器网站上创建联系表单,并将该联系表单数据发送到已启用php的另一台服务器,然后使用phpmail函数将该数据发送到指定的电子邮件地址?

I am currently working on a project where the site is static and the server does not have php installed or anyother dynamic server side language. I've noticed companies like uservoice that somehow get data from a static website to their servers. How can I create a contact form on my static 'no php server' web site and get that contact form data to another server that has php enabled and then send that data with the phpmail function to the specified email address?

推荐答案

只需将表单的action属性设置为指向其他服务器:

simply set the action attribute for your form to point to the other server:

<form method="post" action="http://example.com/process.php">
  <input type="text" name="my_textfield" />
  <input type="submit" value="send!" />
</form>

这篇关于如何将邮件从静态网站.htm发送到不同网站上的php服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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